Skip to content

Critically missing linearization #25

@virtualritz

Description

@virtualritz

I briefly looked at the code and seems there is no linearization happening before downsampling. 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 there are no u16/f16 or f32 images supported where there is enough bits to store data linearly in the pixel buffer).

See http://www.ericbrasseur.org/gamma.html for a detailed explanation.

This is the test image from above website:
gamma_dalai_lama_gray

The expected result:
gamma_dalai_lama_gray_good

And what the code in this crate produces instead:
gamma_dalai_lama_gray_result

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