Open wezm opened 3 years ago
@wezm Thanks for opening an issue! I think that sounds like a good solution (adding an Unknown
variant to Chunk
). Eventually I would like to support the chunks directly as well, so I guess there's two task items here. I might be able to work on it next weekend, otherwise if you want to make a PR, feel free to.
I'm going to leave this issue open until gAMA and cHRM chunks can be parsed and written, even though unknown chunks have now been implemented on master.
@wezm Just released png_pong 0.8.0, with your PRs for UnknownChunk
and std::error::Error
.
Wonderful. Thank you 😀
Is your feature request related to a problem? Please describe.
Attempting to read an image with a
gAMA
andcHRM
chunks (which are in the PNG1.2 spec) results inUnknownChunkType
error.Describe the solution you'd like
I'd like to be able to losslessly stream a PNG from a
Decoder
toEncoder
, to do so it would be ideal to propagate all chunks from the source to the destination. Perhaps there could be an extra variantUnknown
added toChunk
that carries the chunk type and data, so that it can be passed through to the encoder as-is.Describe alternatives you've considered
I can ignore the error for now and skip this chunk.
Additional context
The image in question: