GithubHelp home page GithubHelp logo

Comments (4)

RaenonX avatar RaenonX commented on August 25, 2024 1

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

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 OPS of 2, could be 2 itself if the OPS of 2 is APNG_DISPOSE_OP_NONE?) > 4 > 5

Will this being implemented in the future?

For the extraction not renderer actually. Will try to implement this OPS handling along with x, y offsets, if I also find some time and you're welcome for that 🤣

from pyapng.

eight04 avatar eight04 commented on August 25, 2024

It doesn't actually "reuse" a chunk. Frame 7 (in your picture) uses APNG_DISPOSE_OP_PREVIOUS, which means that before rendering frame 8, the image viewer should revert the buffer to frame 6. Since frame 8 is an empty image, it looks like that frame 6 is rendered again.

from pyapng.

RaenonX avatar RaenonX commented on August 25, 2024

I see. So the data in fdAT are basically meaningless, is that right?

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?

from pyapng.

eight04 avatar eight04 commented on August 25, 2024

I see. So the data in fdAT are basically meaningless, is that right?

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?

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

will this being implemented in the future?

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.

from pyapng.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.