Image Manipulation

work in progress

cf. Video Manipulation

Convert SVG

$ convert -antialias -resize 128x128 -background none sample.{svg,png}

Set Transparency

$ convert -transparent white -fuzz 10% sample.{jpg,png}

Crop

$ convert -crop +20+10 input.jpg output.jpg
$ convert -crop -20-10 input.jpg output.jpg

The first command removes 20 pixels from the left and 10 pixels from the top, the second command removes 20 pixels from the right, 10 pixels from the bottom.

In some cases such trimming might be automated:

$ convert -trim input.jpg output.jpg

Resize GIF

$ convert input.gif -coalesce -resize 128x -deconstruct output.gif