-
Notifications
You must be signed in to change notification settings - Fork 142
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
Write new image using chunks from StreamingDecoder
?
#253
Comments
When you call |
The compression method, filter method, and interlace method are missing from |
In |
For my use case, I only need the encoder to get the My problem is that I don't want to process the png twice with both |
I have the same use-case, writing the same image back but removing or altering already existing iTXT chunks. Did you get around using the double decoding @0x6273? Has there been any work on this? If not, would it be (good) enough to just make the fields public inside of StreamingDecoder? I'd be happy to contribute back as I make use of the library myself @HeroicKatora :) |
A getter |
I'm trying to modify an image's
iTXt
metadata. I'm usingStreamingDecoder
to read the chunks from the original image, andWriter::write_chunk
to create a new image with modified metadata. But the API to construct theWriter
needs information such as the image dimensions and color palette, for writing the header.StreamingDecoder
seems to have all this information internally after passing theIHDR
chunk, but it is in a private field with no public getter.My current solution is to read the entire image into memory, and then use
Decoder
, which I can then turn into aReader
and then get the header info fromReader::info()
. But I'm wondering if there is a better way to do this using onlyStreamDecoder
, so I don't have to make two decoding passes?The text was updated successfully, but these errors were encountered: