jahmax
jahmax

Reputation: 8589

How to convert images (GIF, JPG, JPEG, PNG) to TIFF in PHP?

How can I convert images to .tiff with php? (im testing on win xp)

I remember I used imagemagick to do this but I cant find the code now, and couldnt find any example on google.

A code sample will be appreciated.

Also, is there a way to do it without imagemagick?

Upvotes: 0

Views: 8599

Answers (2)

falakniazi
falakniazi

Reputation: 133

Following is the code sample that might be helpful for you.

<?php
try
{
  $image = new Imagick("testing.jpg");
  $image->writeImage("page.tiff");
}
catch(Exception $e)
{
  echo $e->getMessage();
}
?>

Upvotes: 4

Paresh Mayani
Paresh Mayani

Reputation: 128428

i think this links helps you, checkout this:

  1. http://pecl.php.net/package/imagick
  2. http://php.net/manual/en/book.imagick.php,

Upvotes: 3

Related Questions