Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
sanjaytaunk
Posts: 1
Joined: 2019-03-20T10:01:26-07:00
Authentication code: 1152

Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by sanjaytaunk » 2019-03-20T10:15:29-07:00

I want to convert compressed tiff(Group4 - CCITT_T.6) to PNG format image.

Link to compressed tiff: https://drive.google.com/file/d/1lsNRRR ... sp=sharing

Below command does NOT work becuase tif image is compressed(Group4 CCITT_T.6):
convert.exe CCITT_T.6_Compressed.TIF -auto-orient -strip test.png

I tried so far with:
ImageMagick-6.9.10-34-portable-Q16-x64 (convert.exe)
ImageMagick-7.0.7-11-portable-Q16-x64 (convert.exe / magick.exe)

I keep getting below errors:
Bad value 0 for "ResolutionUnit" tag. `_TIFFVSetField' @ error/tiff.c/TIFFErrors/608. OR
Bad value 0 for "ResolutionUnit" tag. `_TIFFVSetField' @ error/tiff.c/TIFFErrors/645.

snibgo
Posts: 12269
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by snibgo » 2019-03-20T11:25:38-07:00

The "ResolutionUnit" error prevents IM from reading and processing the file.

As a workaround, the program tiffcp reports the error but allows processing, writing a result without the problem, that can then be processed by IM.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 25654
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by fmw42 » 2019-03-20T11:26:41-07:00

I have already reported this privately to the ImageMagick developers. It works in older versions of ImageMagick such as 6.9.3.0, but not in current versions of IM 6 or 7. Libtiff will handle it, but ImageMagick is seeing that message as an error and perhaps it should just be a warning.

User avatar
magick
Site Admin
Posts: 11070
Joined: 2003-05-31T11:32:55-07:00

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by magick » 2019-03-21T17:12:40-07:00

ImageMagick is behaving properly. The exception is thrown by the libtiff delegate library and we respond accordingly. Any TIFF image, upon opening, that throws an error exception is cause for ImageMagick to exit. You can query the libtiff developers to determine if the exception is mis-classified. If libtiff instead throws a warning, ImageMagick can safely ignore the warning and continue execution.

User avatar
fmw42
Posts: 25654
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by fmw42 » 2019-03-21T17:29:45-07:00

In older versions this does work with the same libtiff and an image is created. So what has changed?

User avatar
magick
Site Admin
Posts: 11070
Joined: 2003-05-31T11:32:55-07:00

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by magick » 2019-03-21T17:46:14-07:00

You may recall the developers have spent this last year hardening ImageMagick to make it more secure. ImageMagick previously was forgiving about errors, now its not.

User avatar
fmw42
Posts: 25654
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Facing Error while I try convert compressed tiff image(Group4 - CCITT_T.6) to PNG, using ImageMagick's convert.exe?

Post by fmw42 » 2019-03-21T21:00:19-07:00

OK. Thanks.

Post Reply