Giter VIP home page Giter VIP logo

Comments (4)

davidmz avatar davidmz commented on August 29, 2024 1

There is no problem with the image :) The APNG format is simple, but has some tricks. Each frame has, besides the image itself, two fields: 'dispose_op' and 'blend_op' (https://wiki.mozilla.org/APNG_Specification). In your APNG, frame1's dispose_op is 2 (APNG_DISPOSE_OP_PREVIOUS). This means that after showing this frame, the player must forget about it and apply the next frame to the previous frame state.

This is the full player sequence:

  1. Show frame0.
  2. Show frame1 on top of the current image
  3. Reset the current image to the state before step 1 and show frame 2 on top.
  4. Show frame3 on top of the current image.
  5. Repeat from step 1.

So the "flatten" image of frame2 is actually applied to the image of frame0 instead of frame1.

from apng-js.

sunset-horizon avatar sunset-horizon commented on August 29, 2024 1

I have used your method and indeed solved my problem. Thank you very much and wish you a happy life

from apng-js.

davidmz avatar davidmz commented on August 29, 2024

Hi! I don't actually see any problems with this file. The player on the demo page displays it correctly, and the third frame is indeed that size.

Could you describe what problems you are seeing in your project?

from apng-js.

sunset-horizon avatar sunset-horizon commented on August 29, 2024

Thank you for your reply. The current issue I am facing is playing with this image. In the third frame, due to the sudden flattening of the image, the effect looks strange. At first, I thought it was a code parsing problem, but after seeing your reply, I realized that there was a problem with this image. However, I am not sure why the demonstration animation does not display the problem

from apng-js.

Related Issues (20)

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.