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

ImageMagick can't detect animated PNG #24

Closed
kamenik opened this Issue Aug 31, 2015 · 12 comments

Comments

Projects
None yet
7 participants
@kamenik

kamenik commented Aug 31, 2015

Identify animated.png doesn't return data about animation. Used with JMagick, isAnimatedImage() return false for animated png.

@urban-warrior

This comment has been minimized.

Contributor

urban-warrior commented Aug 31, 2015

No such thing as an animated PNG. Do you mean MNG? We did not write nor do we support JMagick. If you reproduce the problem from the command-line or from MagickCore, we will investigate further.

@kamenik

This comment has been minimized.

kamenik commented Aug 31, 2015

Animated PNG - https://en.wikipedia.org/wiki/APNG - it is extension to PNG, similarly as animated GIF is extension to 'normal' GIF.

I know, you are not author of JMagick, but it is just wrapper around your libs. It detects animated GIF correctly.

@urban-warrior

This comment has been minimized.

Contributor

urban-warrior commented Aug 31, 2015

When asked if we support APNG, the PNG developer (Glenn who develops libpng) says: No. We detect and ignore the APNG chunks "acTL", "fcTL", and "fdAT". Why you ask? He further states "It was discussed at length on the PNG development list around 2007, voted upon, and disapproved.
PNG is a single image format, and supporting APNG would lead to the same confusion that
was introduced to GIF by making an animated variant. We would have approved it if the
proponents had not insisted upon using the .png extension instead of .apng."

@revolter

This comment has been minimized.

revolter commented Feb 10, 2017

Well. it's 2017 now, ten years later after Glenn said that. Could you reconsider this?

See https://github.com/onevcat/APNGKit:

Apple recently supported APNG in both desktop and mobile Safari. Microsoft Edge and Chrome are also considering adding APNG support since it is already officially added in WebKit core.

Most probably the .png was used to maintain backwards compatibility.

@revolter

This comment has been minimized.

revolter commented Feb 23, 2017

@urban-warrior, Any take take on what I said?

@glennrp

This comment has been minimized.

Contributor

glennrp commented Feb 23, 2017

The PNG Development Group has not changed its stance regarding APNG. It's a little amusing that the original proponents of APNG have found a need to use ".apng" under some circumstances, in order to distinguish between APNG and PNG datastreams, and they've declared a MIME type for APNG. That approach would have been agreeable to the PNG group.

@QuantumRevenger

This comment has been minimized.

QuantumRevenger commented Sep 16, 2017

I hope this is added to ImageMagick soon as its now available in both Chrome / Firefox now. I am yet to find out whether apng supports playing certain frames once, and looping other sections.

@glennrp

This comment has been minimized.

Contributor

glennrp commented Sep 16, 2017

@QuantumRevenger

This comment has been minimized.

QuantumRevenger commented Sep 16, 2017

That's a shame but thanks for letting me know. If anyone knows of a format which can (if exists) would be appreciated.

Also, will APNG offer better sizes compared to gif? (Does Image Magick support it?)

@glennrp

This comment has been minimized.

Contributor

glennrp commented Sep 16, 2017

The PNG proposed "mPNG" chunk supports arbitrary reuse of frames.
http://libpng.download/documents/proposals/history/png-mpng-proposal-20070411.txt
Proposed 10 years ago and pretty much forgotten.

APNG doesn't provide much better sizes than GIF -- maybe a little due to deflate compression versus LZW compression -- mainly it offers more colors and partial transparency.

@LudwigvonWu

This comment has been minimized.

LudwigvonWu commented Nov 16, 2017

Sorry if I ask, but what about naming the libpng supporting the APNG Specification "libapng" and forcing the output file extension to be ".apng" instead of ".png" whenever a PNG file containing the acTL, fcTL and fdAT chunks is created by ImageMagick? This way the PNG Development Group would have their view on PNG and APNG enforced, while from my tests a large majority of the current software that supports APNG files with ".png" extension also support APNG files with the ".apng" extension, including Goggle Chrome and Mozilla Firefox. The possible lack of backward compatibility wouldn't be a deal breaker, now that around 70% of the currently used browsers support APNG files. Not to say that the APNG Specification itself doesn't specify which file extension should be used for the output file.
I think everyone would win, and as I said before, many users of ImageMagick might not actually mind the forced ".apng" extension, some of them would probably welcome said behavior.

@KrasnayaPloshchad

This comment has been minimized.

KrasnayaPloshchad commented Nov 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment