Month: June 2010

Combining two images with ImageMagick

To combine two images of the same size with ImageMagick, you simply do the following: The following will overlay overlay.png on top of output.png mogrify -draw "image SrcOver 0,0 0,0 ‘overlay.png’" output.pngmogrify -draw "image SrcOver 0,0 0,0 ‘overlay.png’" output.png While

Selective colour replacement with imagemagick

Selective colour replacement is easy from the command line with imagemagick. You can download imagemagick from The following will replace all red (#FF0000) pixels with blue (#0000FF) convert sourceimage.png -fill "#FF0000" -opaque "#0000FF" destimage.pngconvert sourceimage.png -fill "#FF0000" -opaque "#0000FF"

Deleting folders recursively

I needed recursively delete folders named .svn within a directory structure. The following will allow you dto do this from a command prompt: FOR /F "tokens=*" %G IN (‘DIR /B /AD /S .svn’) DO RMDIR /S /Q %GFOR /F "tokens=*"