Can convert jpg but not tif

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
benny

Can convert jpg but not tif

Post by benny »

Can someone please tell me why it works to convert jpg files but not tif files. When I run this code on my webhost it creates logo1.jpg from logo.jpg But it will not create logo1.tif

The tif file is only 48K in size so it should not be a memory problem. My webhost is running
ImageMagick version 6.2.6
PHP imagick version 0.9.11

Strange...

Code: Select all

<?php

$exec = "/usr/bin/convert 'logo.jpg'  'logo1.jpg' $yaks ";
exec($exec, $yaks);
print_r ($yaks);

$exec = "/usr/bin/convert 'logo.tif'  'logo1.tif' $yaks ";
exec($exec, $yaks);
print_r ($yaks);
		
?>
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Can convert jpg but not tif

Post by fmw42 »

benny wrote:Can someone please tell me why it works to convert jpg files but not tif files. When I run this code on my webhost it creates logo1.jpg from logo.jpg But it will not create logo1.tif

The tif file is only 48K in size so it should not be a memory problem. My webhost is running
ImageMagick version 6.2.6
PHP imagick version 0.9.11

Strange...

Code: Select all

<?php

$exec = "/usr/bin/convert 'logo.jpg'  'logo1.jpg' $yaks ";
exec($exec, $yaks);
print_r ($yaks);

$exec = "/usr/bin/convert 'logo.tif'  'logo1.tif' $yaks ";
exec($exec, $yaks);
print_r ($yaks);
		
?>

Do you have libtif installed? You can see what image types you have installed by issuing the command,

convert -list configure

look at the line that starts with DELEGATES. For example, mine shows:

DELEGATES bzlib fontconfig freetype jpeg jp2 lcms lqr openexr png tiff x11 xml zlib

You can get the delegates at:
http://www.imagemagick.org/download/delegates/

Sorry I do not use PHP, so I cannot tell you how to do the equivalent in PHP. Hopefully someone like Bonzo will reply as he uses PHP regularly.
Post Reply