Convert
From Attie's Wiki
(Difference between revisions)
(Created page with "Image modification on the command line. ==Geometry== {| ! Format !! Meaning |- | ''scale''% || Scale the image, by x percent |- | ''scale-x''%x''scale-y''% || Height and widt...") |
Latest revision as of 19:08, 3 October 2012
Image modification on the command line.
[edit] Geometry
Format | Meaning |
---|---|
scale% | Scale the image, by x percent |
scale-x%xscale-y% | Height and width are scaled individually by x / y percent |
width | Height automatically adjusts to maintain aspect ratio |
xheight | Width automatically adjusts to maintain aspect ratio |
widthxheight | Scale to fit in the box widthxheight, maintains aspect ratio |
widthxheight^ | Scale to used box widthxheight as minimum sizes, maintains aspect ratio |
widthxheight! | Resize to widthxheight, aspect ratio ignored |
widthxheight> | Shrinks images larger than widthxheight, to this size |
widthxheight< | Enlarges images smaller than widthxheight, to this size |
widthxheight{+-}offset-x{+-}offset-y | For example, used with -crop to specify a region to keep
|
[edit] Resize
convert ${FILE_IN} -resize ${WIDTH}x${HEIGHT} ${FILE_OUT}
[edit] Crop
convert ${FILE_IN} -resize ${WIDTH}x${HEIGHT}+${OFFSET_X}+${OFFSET_Y} ${FILE_OUT}