tools/resources/optimize-png-files.sh breaks APNGs |
|||
Issue descriptionSee issue 835197 optimize-png-files.sh runs pngcrush, but does not take into account that a file is an APNG. So, for example, a png might not have transparency in frame 0, but need it for composing frames. The PNG is crushed by changing its color type to RGB (instead of RGB + alpha), resulting in an animation that does not look as intended. The simplest solution would be to skip files that are APNGs. They can be identified by acTL chunks. But it looks like optimize-png-files.sh doesn't look at the data directly, and I didn't see (in a quick look) how to do any detection with pngcrush, so we may need to write more code to detect acTL. Not sure who to assign this to. Added people from the original bug, plus agrieve@chromium.org who is an OWNER of the script's directory.
,
Apr 25 2018
FWIW, the CL linked to in #1 states: "Something that is more likely to break: animation" So it may have just gotten lucky?
,
Apr 27 2018
,
Apr 27 2018
re: lucky -- i inspected hundreds of pngs for any type of failures (most of the animations were broken, so I reverted those case-by-case).
,
Apr 30 2018
Ouch that's scary. Thanks for chiming in, I thought you were just lucky or running a more recent pngcrush. |
|||
►
Sign in to add a comment |
|||
Comment 1 by pbos@chromium.org
, Apr 25 2018