$ convert your.jpg -transparent white your.png
convert -flatten img1.png img1-white.png
convert -transparent '#FFFFFF' nontransparent.gif transparent.png
convert -size 3200x3200 tile:single_tile.png final.png
montage -geometry +0+0 -background transparent *png montage.png
convert before.png -negate after.png
convert large_image.png -resize 16x16! favicon.ico
convert input.jpg -resize 250x90 output.jpg
convert input.jpg -resize '250x90^' output.jpg
This code reads in the image, copys it with +clone, resizes and saves it. Then resizes and saves the next size. The part of the code within the ( ) has no effect on any of the other part of the code.
convert input.jpg \( +clone -resize 600x600 -write first_save.jpg +delete \) -resize 60x60 thumbnail.jpg
Defining the size of the jpg when loading it will speed up the resizing process. This is done by adding the -size option.
convert -define jpeg:size=250x90 input.jpg -resize 250x90 output.jpg
I also once needed to add numbers to a individual parts of a tiled image. I found it easier to script this with Ruby rather than use the shell's looping constructs:
cmd = (0..324).to_a.inject([]) do |cmd,n|
y=(n/25*32)+15; x=((n%25)*32)+15
cmd << "-draw 'fill red text #{x},#{y} \"#{n}\"'"
end
convert img.png #{cmd.join(' ')} annotated_img.png