Page 1 of 1

Batch convert to apng

Posted: 2018-01-22T05:24:24-07:00
by hellocatfood
I'm using ImageMagick 6.9.7.4 on Ubuntu 17:10. I'm trying to convert a folder full of .gifs to .apng files. I'm doing this by running

Code: Select all

mogrify -format apng *.gif
. However, when I run this I get the following error:

Code: Select all

mogrify-im6.q16: unable to open image `apng:': No such file or directory @ error/blob.c/OpenBlob/2701.
mogrify-im6.q16: unrecognized image format `apng' @ error/mogrify.c/MogrifyImageCommand/4927.
If I choose any other format it works, and also if I use the convert command to convert one file. Is this an error with mogrify?

Re: Batch convert to apng

Posted: 2018-01-22T07:11:30-07:00
by snibgo
"mogrify -list format" will show you a list of formats that program can read/write. In my rather old versions of IM, "apng" isn't among them.

Re: Batch convert to apng

Posted: 2018-01-22T11:44:46-07:00
by fmw42
I do not believe Imagemagick supports APNG only MNG

Re: Batch convert to apng

Posted: 2018-01-22T16:15:31-07:00
by hellocatfood
fmw42 wrote: 2018-01-22T11:44:46-07:00 I do not believe Imagemagick supports APNG only MNG
That's interesting! I converted all of the files to apng by running

Code: Select all

for file in *.gif ; do convert $file ${file%.*}.apng ; done
I ran identify on one of the files and it returned this:

Code: Select all

email.apng[0] GIF 55x60 55x60+0+0 8-bit sRGB 256c 24.6KB 0.010u 0:00.000
So it seems you're right!

Re: Batch convert to apng

Posted: 2018-01-22T17:11:09-07:00
by fmw42
My guess is outputs the same as the input, since it shows GIF as the format. It does not recognize the desired apng and just outputs the input.

Re: Batch convert to apng

Posted: 2019-05-15T07:18:37-07:00
by greenlands
If you would like ImageMagick to support APNG, you can add a message to this request:

https://www.imagemagick.org/discourse-s ... hp?t=20092