0

I am using imagemagick convert to extract multiple tif images from a single tif file. But when I use the following command

convert image.tif single%d.tif

I get very low quality (sort of blurred) images. The files single1.tif, single2.tif and so on are of very low quality as compared to the quality of the images in the original image.tif file. I then tried

convert -enhance image.tif single%d.tif

Still I got very low quality images in the output.

What should I do to get just images with original quality separated in multiple files?

Additional output is here:

convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.

convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37680 (0x9330) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
convert: image.tif: invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37679 (0x932f) encountered. `TIFFReadDirectory'.
convert: image.tif: unknown field with tag 37681 (0x9331) encountered. `TIFFReadDirectory'.
convert: Depreciated and troublesome old-style JPEG compression mode, please convert to new-style JPEG compression and notify vendor of writing software. `OJPEGSetupDecode'.
2
  • Can you add (a link to a) sample multi-Page TIFF exhibiting the behaviour you observe? This should normally not happen... Dec 16, 2014 at 14:48
  • Can you also please post the output of the following commands: identify image.tif and identify single*.tif? Dec 16, 2014 at 14:49

1 Answer 1

0

You could try converting to a lossless image type instead of outputting more TIFF files. AFAIK, ImageMagick avoids recompression at all costs; but since it's throwing warnings that the original file is using old style compression (TIFF Revision 6 JPEG prior to Technote 2) it may be recompressing them anyway causing lower quality.

Try a lossless format first; if that doesn't help you might have to use a different library to extract the frames.

convert image.tif single%d.png

or

convert image.tif single%d.bmp

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .