-
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
Pass repeat count by argument #4
Comments
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.
|
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? |
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 |
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! |
|
Is it possible to pass a repeat count to the apng file? At the moment the repeat count stands at "-1" for repeat forever? Does the specification for apng even support repeat count?
The text was updated successfully, but these errors were encountered: