How to convert tiff to a single jpg???

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
YouPict.Ru
Posts: 9
Joined: 2011-10-26T20:42:14-07:00
Authentication code: 8675308

How to convert tiff to a single jpg???

Post by YouPict.Ru » 2011-10-26T20:58:29-07:00

Hi!

Converting the tiff to format jpg generated a lot of files jpg:

Code: Select all

use Image::Magick;          
$image = Image::Magick->new;
$image->Read("test.tif");
$image->Set (compression=>"JPEG", quality=>90);
$image->Write ("test.jpg");       
Resut: test.tif -> test-0.jpg, test-1.jpg and etc.

How to convert tiff to a single jpg???

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How to convert tiff to a single jpg???

Post by anthony » 2011-10-27T00:34:22-07:00

You can convert a multi-image TIFF into a single JPEG. JPEG can't hold multiple images.

You can read ONE image from the tiff , just read "test.tiff[0]" instead.

See IM Examples, File Handling, Read Modifiers
http://www.imagemagick.org/Usage/files/#read_mods
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

YouPict.Ru
Posts: 9
Joined: 2011-10-26T20:42:14-07:00
Authentication code: 8675308

Re: How to convert tiff to a single jpg???

Post by YouPict.Ru » 2011-10-27T03:12:58-07:00

many thanks!

Post Reply