BillHung.Net


powered by FreeFind     sms

ImageMagick

Started 20 Dec 2005

Reference: http://www.imagemagick.org/script/command-line-tools.php
Reference: http://www.cit.gu.edu.au/~anthony/graphics/imagick6/formats/
 

Original file


cs150project_original.jpg 50.7KB

Rotate

 convert cs150project_original.jpg -rotate 90 cs150project_rotated.jpg
   //rotate the image clockwise 90 degrees


cs150project_rotated.jpg 48.1KB

Batch

mogrify -rotate 90 *.jpg
  //rotate all images in this folder with extension .jpg clockwise 90 degrees, replacing original image, mogrity replace the original file
  //INPUT: a bunch of images; OUTPUT: same number of images with the input images rotated 90 degrees clockwise

 

GIF Animation


rotateballs.gif 44KB

$ convert OPENGL???.jpg -resize 100x100 animate.gif
  //INPUT: 14 jpg pictures with prefix of "OPENGL"; OUTPUT: Animated 100x100 gif file


sphere.gif 17.7KB

$ convert -delay 100 *.JPG sphere.gif 
  //INPUT: 2 JPG pictures with suffix of ".JPG"; OUTPUT: Animated  gif file changing every second

Contrast/Brightness

contrast_original.jpg 24.1KB

contrast_50_100_1.jpg 24.1KB

By the way, I drew this picture for the Manga Club when I was in Japan in 2005.
Reference: http://www.cit.gu.edu.au/~anthony/graphics/imagick6/color/

convert contrast_original.jpg -level 50%,100%,1.0 contrast_50_100_1.jpg
//INPUT: Picture that is too bright; OUTPUT: Black color is 50% of the original color range, 100% is the origial white color, 1.0 is no change of gamma value

Batch Create Thumbnail

convert $path -thumbnail x100 -resize '100x<' -resize 50% -gravity center -crop 50x50+0+0 +repage -format jpg $pathToImages/thumb/$thumb_name
//$path is the complete path to the input image, $pathToImage... is the path to the output, this command create 50x50 thumbnails

Create Image Tile

montage +frame +shadow +label -tile 16x10 -geometry 50x50+0+0 *.jpg output.jpg
//montage is for tiling image, the + options are there to get rid of the spacing between frames, this will give a tile of 16x10 for 50x50 images