Thursday, August 13, 2009

hardcore magick




I'm slicing up some massive png files with Imagemagick's convert program for the Orchive, and have to generate more than 100 slices of a huge 300MB image. It was taking quite a while to do each one individually, so I found this great resource on writing multiple images with one convert command:


convert cyclops.gif -fill lightsteelblue -draw 'color 0,0 floodfill' \
\( +clone -resize x128 -write cyclops_lrg.jpg +delete \) \
\( +clone -resize x96 -write cyclops_big.jpg +delete \) \
\( +clone -resize x64 -write cyclops_med.jpg +delete \) \
-resize x32 cyclops_sml.jpg


Works super well, and much faster than before.