You want to use mogrify to change the image in place.
Code: Select all
find -name '*.gif' -print0 | xargs -0 mogrify -fill "#2c3e84" -opaque "#339966"
Mogrify can take a list of filenames, so no need for -n1 or -i
For convert you need a input and ouptut image
Code: Select all
convert input.gif -fill "#2c3e84" -opaque "#339966" -output image.gif
or as it can write to image it read from, you can do this in xargs...
Code: Select all
find -name '*.gif' -print0 | xargs -0 -n1 -i@ convert @ -fill "#2c3e84" -opaque "#339966" @
The former is probably better.
If you have multiple processes (and not worried about 'openmp') you can substitute GNU 'parellel' for 'args'
WARNING: doing this is DANGERIOUS. if anything goes wrong you may loose images. See
http://www.imagemagick.org/Usage/basics/#mogrify