Re: tiff:photometric and CCITT compression
Bob Friesenhahn <[email protected]> Wed, 11 Oct 2023 08:25:19 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 11 Oct 2023, frechefuchs via Graphicsmagick-help wrote: > 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. Have you tested if GM is able to successfully write min-is-white via libtiff by modifying GM code (as you had suggested)? It is useful to verify that libtiff does not reject it as an illegal case. The utilities/tests/gen-tiff-images/genimages script which is included in the GM source tree could be updated to also include compressed variants. It already generates 5568 files without even including compression. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt