Code: Select all
convert -delay 100 -loop 0 *.png a.gif
I would like to ask if there's any way to remove those transparent areas? I only want a gif with the size of 575x500.
Code: Select all
convert -delay 100 -loop 0 *.png a.gif
Is that true? What is the text output from "identify *.png"?searene wrote:I have multiple png files, all of them are of size 575x500, ...
Code: Select all
convert -delay 100 -loop 0 *.png +repage a.gif
Code: Select all
mogrify -crop 575x500+715+322 *.png
Code: Select all
➜ Desktop identify *.png
2017-04-15-160537_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 173c 3.41KB 0.000u 0:00.000
2017-04-15-160607_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 10.3KB 0.000u 0:00.000
2017-04-15-160618_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 10.3KB 0.000u 0:00.000
2017-04-15-160808_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 14KB 0.000u 0:00.000
2017-04-15-160819_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 13KB 0.000u 0:00.000
2017-04-15-160847_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 16.4KB 0.000u 0:00.000
2017-04-15-160858_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 17.3KB 0.000u 0:00.000
2017-04-15-160913_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 19.3KB 0.000u 0:00.000
2017-04-15-160946_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 20.3KB 0.000u 0:00.000
2017-04-15-161002_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 21.5KB 0.000u 0:00.000
2017-04-15-161012_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 21.1KB 0.000u 0:00.000
2017-04-15-161020_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 19.9KB 0.000u 0:00.000
2017-04-15-161046_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 23KB 0.000u 0:00.000
2017-04-15-161053_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 24.7KB 0.000u 0:00.000
2017-04-15-161119_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 26.1KB 0.000u 0:00.000
2017-04-15-161123_1920x1080_scrot.png PNG 575x500 1920x1080+715+322 8-bit sRGB 256c 12.9KB 0.000u 0:00.000
Code: Select all
convert -delay 100 -loop 0 *.png +repage a.gif
That's because you didn't have "+repage" when you created the PNG files, so they ended up with a canvas size of 1920x1080. The canvas size doesn't merely mean the image was cropped. It means the image sits on a larger canvas, at a certain offset.searene wrote:I'm still curious why the original gif file, which was created without +repage, was of size 1920x1080.
Code: Select all
convert -delay 100 *.png -coalesce -trim +repage -loop 0 -layers optimize a.gif