Home > Software design >  Captioning all frames of a gif
Captioning all frames of a gif

Time:07-08

I have a simple bash script to caption still images (jpg, png...) but it completely fails when given an animated gif. The error is convert: unable to write pixel cache '/tmp/magick-[random chars]': No space left on device @ error/cache.c/WritePixelCachePixels/5854. There are many questions enter image description here

Imagemagick 6 Unix Syntax:

convert  \( anim.gif -coalesce \) null: \( -size 100x -background white -gravity north -fill black caption:"THIS IS A TEST OF CAPTIONING TEXT ON AN ANIMATION" \) -compose over -layers composite -layers optimize anim2.gif

enter image description here

For Windows, remove the \s

For Imagemagick 7, change convert to magick.

CodePudding user response:

You can also do this in Imagemagick.

convert anim.gif -coalesce \
-gravity north -background white \
-splice 0x18 -font Arial -pointsize 12 -annotate  0 0 'THIS IS A TEST OF CAPTIONING TEXT' \
-layers Optimize anim3.gif

enter image description here

  • Related