dooman87 / imagemagick-docker

Running the latest version of imagemagick inside container
https://hub.docker.com/r/dpokidov/imagemagick
MIT License
95 stars 25 forks source link

Can't convert animated png files #40

Open JasonQuinn opened 1 year ago

JasonQuinn commented 1 year ago

When I try to convert an animated png file (like https://en.wikipedia.org/wiki/File:Animated_PNG_example_bouncing_beach_ball.png) to a gif I get an error saying ffmpeg isn't installed in the container

docker run -v /tmp/imgs:/imgs dpokidov/imagemagick apng:/imgs/testing_animated.png /imgs/test_apng.gif
sh: 1: ffmpeg: not found
convert: no images defined `/imgs/test_apng.gif' @ error/convert.c/ConvertImageCommand/3342.
dooman87 commented 1 year ago

Thanks Jason for reporting this. I could reproduce an issue. I think building and including ffmpeg as part of this project would be a bit of extreme, however I believe we can look into building libpng with APNG patch looking at this code: https://github.com/ImageMagick/ImageMagick/blob/main/coders/png.c#L13

dooman87 commented 1 year ago

After some further looking into this unfortunately reading APNG files require ffmpeg. Having and supporting ffmpeg as part of these images would be a big deal (bigger sizes of docker images, additional dependencies), but we can most certainly look into creating a new image with added FFMPEG. There seems to be a good instruction on how to compile it here

JasonQuinn commented 1 year ago

Yeah a separate image would be great