Comments (5)
Yes, you can specify repeat count in APNG. In this library, the repeat count is always 0 (infinite):
Line 261 in aeb6973
And it is ignored when reading frames from an APNG file:
Lines 347 to 348 in aeb6973
I think we should expose it as a public property
num_plays
of APNG
instance.from pyapng.
Wow! thank you for the very fast reply. The way to pass this argument would be amazing and would solve my issue. Anyways, how should we move on? I'm pretty new to python and especially to APNG. Should I make the changes or would you like to go ahead?
from pyapng.
PRs welcome. I would expect something like:
im = APNG.from_files(some_files)
assert im.num_plays == 0
im.num_plays = 5
im.save(result_file) # the result animation should only repeat 5 times
im = APNG.open(result_file)
assert im.num_plays == 5
from pyapng.
pyAPNG works great, and I do like it a lot.
Regarding #4, could you add a code example to the documtation, how an infinite repeat as well as only-play-once of the animation should be written? Thanks in advance!
from pyapng.
APNG
object has a num_plays
property. You can modify this property before writing APNG to file.
from pyapng.
Related Issues (11)
- Fatal error reading PNG image file: Missing PLTE before IDAT HOT 5
- integer out of range for 'I' format code HOT 3
- .apng to .gif convert? HOT 1
- Installed apng, but it seems to be empty HOT 2
- Bug handling large PNG files containing multiple data chunks in one frame
- PNG Frame Extract Weirdness HOT 3
- not install the test
- APNG_DISPOSE_OP_PREVIOUS not handled HOT 4
- Rename FrameControl.depose_op to dispose_op
- Add `pyAPNG` to Conda Forge HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyapng.