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

Wrong APNG frame delay #7371

Closed
Yay295 opened this issue Jun 4, 2024 · 3 comments
Closed

Wrong APNG frame delay #7371

Yay295 opened this issue Jun 4, 2024 · 3 comments

Comments

@Yay295
Copy link

Yay295 commented Jun 4, 2024

ImageMagick version

7.1.1-33

Operating system

Windows

Operating system, version and so on

Windows 10

Description

The duration of the second frame in the attached image is wrong. The delay numerator for both frames is 16384, while the denominator is 4096 and 16384. The frame durations then should be 400 and 100.

Steps to Reproduce

> magick identify -format %T\n apng:different_durations.png
400
99

Images

different_durations

@dlemstra
Copy link
Member

dlemstra commented Jun 4, 2024

That looks like a rounding difference?

@Yay295
Copy link
Author

Yay295 commented Jun 4, 2024

It shouldn't be. 16384 / 16384 is 1; there's nothing to round.

@dlemstra
Copy link
Member

dlemstra commented Jun 5, 2024

Turns out it was a rounding error. I just pushed a patch to fix that and this will be the output in the next version:

I:\issues\im7\7371>magick identify -format %T\n apng:different_durations.png
400
100

@dlemstra dlemstra closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants