Skip to content

Decode PNG to source stream's pixel type #1813

@antonfirsov

Description

@antonfirsov

PNG decoder is not CPU intensive compared to other codecs, but we can save some memory if there is no alpha or if the PNG is grayscale. We can instantiate the Image<T> after reading the header chunk depending on header.ColorType and header.BitDepth.

It would also help preserving the original images precision in case of header.BitDepth == 16.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions