Can I programatically determine if a PNG is animated?
Posted
by
alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-12-24T08:37:16Z
Indexed on
2010/12/24
8:54 UTC
Read the original article
Hit count: 307
I have PNG (as well as JPEG) images uploaded to my site.
They should be static (i.e. one frame).
There is such thing as APNG.
(it will be animated in Firefox).
According to the Wikipedia article...
APNG hides the subsequent frames in PNG ancillary chunks in such a way that APNG-unaware applications would ignore them, but there are otherwise no changes to the format to allow software to distinguish between animated and non-animated images.
Does this mean it is impossible to determine if a PNG is animated with code?
If it is possible, can you please point me in the right direction PHP wise (GD, ImageMagick)?
© Stack Overflow or respective owner