-
Notifications
You must be signed in to change notification settings - Fork 11
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
APNG_DISPOSE_OP_PREVIOUS not handled #18
Comments
It doesn't actually "reuse" a chunk. Frame 7 (in your picture) uses |
I see. So the data in So basically everytime I encounter an DISPOSE_OP_PREVIOUS, it will go back to render the previous frame, then go to the next not-yet-rendered nonempty frame. For example, if there are 5 frames with the 3rd frame being DISPOSE_OP_PREVIOUS, my actual order will be 1 2 1 4 5, is that right? Thanks for the response in advance & will this being implemented in the future? |
No. The buffer will be reset to frame 2 before rendering frame 4. So it will be: 1 > 2 > 3 > (reset to the buffer before rendering 3) 4 > 5 https://wiki.mozilla.org/APNG_Specification#.60fcTL.60:_The_Frame_Control_Chunk
Do you mean you need an image renderer? I think it shouldn't be hard by using Pillow as the canvas. Currently I have no time to implement it but I'll merge the PR if you would like to contribute. |
Actually I've checked this page after you responded. Not quite sure if this is correct: Render 1 > Render 2 > Render 3 > Reset to the buffer before rendering 3 (Content depend on the
For the extraction not renderer actually. Will try to implement this |
I got an APNG from here.
I tried extracting the frames using this, but found that there is a frame being extracted in only 1x1. Here's the extraction result
Then I used APNG Disassembler to extract the frames, I got that "missing frame".
It appears that frame 6 and 8 are the same, but frame 8 cannot be extracted using this. Here's the chunk structure acquired by
pngcheck v2.3.0
:That
fdAT
at0x226
with length only 17 is the missing one. I tried finding information by inspecting the documentation of both APNG and PNG, but cannot find any information about potentially reusing the frame. All other chunks seems also not indicating this reuse.How to handle this case?
Note
libpng
to read the png, which I then inspected their documentation, but still found nothing about the reuse.The text was updated successfully, but these errors were encountered: