Canop / Canop/squale

Missing linearization

Open
#1 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
11
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I'm currently going through the Rust ecosystem of crates performing image resampling to make a list of which ones actually qualify to get this right.
`u8`/channel color data will always have some gamma for obvious reasons.

I.e. the results of the downsampling using this crate are just always wrong as data must be linearized for the filtering math to produced meaningful results.

See http://www.ericbrasseur.org/gamma.html for a detailed explanation. Also see https://imagemagick.org/Usage/resize/#resize_colorspace for some less extreme but still pretty obvious examples (Earth City Lights image).

This is the test image from first website above:
![gamma_dalai_lama_gray](https://github.com/Traverse-Research/ispc-downsampler/assets/387036/47b6f022-5b7d-45ef-8967-bff7d4410ef3)

The expected result:
![gamma_dalai_lama_gray_good](https://github.com/Traverse-Research/ispc-downsampler/assets/387036/ff5ae266-1057-4d1b-a41b-cff1057c9410)

And what the code in this crate produces instead:
![gamma_dalai_lama_gray-129x129](https://github.com/Canop/squale/assets/387036/4384b884-a0f3-4759-8461-e513ae3bf7db)

Also see [this issue](https://github.com/Traverse-Research/ispc-downsampler/issues/25) for a discussion that may help you with a fix. :)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.