Re: tiff:photometric and CCITT compression

frechefuchs via Graphicsmagick-help <[email protected]> Wed, 11 Oct 2023 11:59:33 +0200
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
Am 11.10.23 um 00:05 schrieb frechefuchs via Graphicsmagick-help:

> When creating images with IM and option -define
> quantum:polarity=min-is-black, I get the expected output of tiffinfo
> and with the image viewers I've tried I couldn't observe an inverted
> image (ristretto, geeqie, gthumb, eog, eom).
I see an inverted image created by IM requesting min-is-white explicitly:

> $ convert logo: -monochrome -define quantum:polarity=min-is-white miw.tif


But I think this is a bug in IM.  Byte-wise comparing two images with
min-is-white and min-is-black photometric interpretation (switching
compression off), the two files seem to only differ in the
PhotometricInterpretation tag.  That is, image data is actually
min-is-black encoded in both cases.

> $ convert logo: -monochrome -compress none -define quantum:polarity=min-is-white miw.tif
> $ convert logo: -monochrome -compress none -define quantum:polarity=min-is-black mib.tif
> $ LANG=C cmp -b mi*.tif
> mib.tif miw.tif differ: byte 307267, line 1 is   1 ^A   0 ^@

Best,
fux