Month: June 2010

Combining two images with ImageMagick

No Picture

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’"…

Read More »

Selective colour replacement with imagemagick

No Picture

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

Read More »

Deleting folders recursively

No Picture

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…

Read More »