Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to write 16 bit image with pnm #1687

Open
Icelk opened this issue Mar 17, 2022 · 0 comments
Open

Fails to write 16 bit image with pnm #1687

Icelk opened this issue Mar 17, 2022 · 0 comments
Labels
kind: bug medium topic: formats Towards better encoding format coverage

Comments

@Icelk
Copy link

Icelk commented Mar 17, 2022

When trying to write a 16-bit image with the PnmHeader below, I get the error Invalid color type for selected PAM color type

pnm::ArbitraryHeader {
    depth: 3,
    height: image.height(),
    width: image.width(),
    maxval: u16::MAX as u32,
    tupltype: Some(pnm::ArbitraryTuplType::RGB),
}

Taking a look at the source, I see no reason as to why only RGB8 & RGBA8 are allowed.

Expected

This should work.

Reproduction steps

Construct an 16-bit RGB image and then pass it to PnmEncoder::write_image, with the header above.

Icelk added a commit to Icelk/strange-attractor-renderer that referenced this issue Mar 17, 2022
@HeroicKatora HeroicKatora added kind: bug medium topic: formats Towards better encoding format coverage labels Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug medium topic: formats Towards better encoding format coverage
Projects
None yet
Development

No branches or pull requests

2 participants