Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CICP profile not extracted from PNG gAMA chunk #2619

Open
Labels
kind: incorrectThis bug causes wrong image data topic: formatsTowards better encoding format coverage
@Shnatsel

Description

This happens in image from git on commit 9ad4348 (after v0.25.8 release)

Expected

The test files in tests/images/png/16bpc all have linear gamma indicated by the gAMA chunk. You can confirm that with imagemagick using the identify command and also with the online PNG chunk inspector: https://www.nayuki.io/page/png-file-chunk-inspector

I expect calling image.color_space() to indicate linear color.

Actual behaviour

This is what I actually get when I load the image and dbg!(image.color_space());

image.pixels.color_space() = Cicp {
 primaries: SRgb,
 transfer: SRgb,
 matrix: Identity,
 full_range: FullRange,
}

That is, the image is still considered sRGB (gamma 0.45455) while the embedded chunk clearly indicates linear light (gamma 1.0).

Reproduction steps

image::open("tests/images/png/16bpc/basn2c16.png").unwrap();
`dbg!(image.color_space());

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: incorrectThis bug causes wrong image data topic: formatsTowards better encoding format coverage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /