Skip to content

Photometric interpretation for Fax4 / 1-bit images #296

@197g

Description

@197g

The test image added in this PR has BlackIsZero and is decoded correctly, but the libtiff test image has WhiteIsZero and is decoded incorrectly.

Meanwhile ImageMagick 6.9.11 decodes both correctly, as does GIMP.

I also could not reproduce the issue with imagemagick reportedly writing broken files. Here's the output of convert input.png -depth 1 -compress group4 imagemagick_group4.tiff

imagemagick_group4.tiff

It has WhiteIsZero interpretation and GIMP and imagemagick both open it correctly while tiff crate inverts the colors.

It seems the photometric interpretation needs to be read and honored after all. Either that, or we're the only ones honoring it and THAT is causing bugs.

Originally posted by @Shnatsel in #229 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions