Skip to content
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

tabs / loop parameter #68

Closed
azgorov opened this issue Apr 20, 2021 · 1 comment
Closed

tabs / loop parameter #68

azgorov opened this issue Apr 20, 2021 · 1 comment

Comments

@azgorov
Copy link

azgorov commented Apr 20, 2021

This is more of a question than issue.

from upng.js code I have this:

UPNG.encode = function(bufs, w, h, ps, dels, tabs, forbidPlte)

from docs UPNG.encode(imgs, w, h, cnum, [dels])

last 2 parameters are missing.
Is there any reason for that.

Using node 12 and trying to set loop count and from js code it is part of "tabs" pameter but this parameter is just ignored even if I add it at the end of encode function.

Best regards
Kalin

@photopea
Copy link
Owner

photopea commented Apr 20, 2021

APNG animations from UPNG.js are looped "infinitely". There is no official way to change it.

You can give UPNG.encode() a fifth parameter: an object {loop:N}, to set the APNG to N loops. But I think people rarely want to specify a finite number of loops, so I prefer to keep the docs simple, without this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants