-
Notifications
You must be signed in to change notification settings - Fork 676
Open
@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());