ImageMagick and Geometry Issue - resizing with >
Posted: 2009-09-21T15:12:42-07:00
0 vote down star
using the latest version of imageMagick for windows (downloaded today)
small_image.jpg = 16x16
large_image.jpg = 800x600
convert small_image.jpg -gravity Center -resize '208x120>' -background white -extent 208x120 s_icon.gif
produces: "convert: invalid geometry `'208x120' @ geometry.c/ParseRegionGeometry/1322" yet it still produces a 208x120 image with the tiny 16x16 image perfectly centered within the new image and canvas size. Perfect.
However, if I try it with the larger image, it gives me the same error but it actually seems to crop rather than scale down as the "208x120>" implies.
What is that error, how do I fix it and why doesn't this command line work for larger images?
What I'm trying to do is rescale while keeping aspect ratio to around 208x120 then forcing paddding around any extra space to create an exactly 208x120 pixel image. Smaller images should just be place in the center without sizing up and larger images shrunk to the new size.
using the latest version of imageMagick for windows (downloaded today)
small_image.jpg = 16x16
large_image.jpg = 800x600
convert small_image.jpg -gravity Center -resize '208x120>' -background white -extent 208x120 s_icon.gif
produces: "convert: invalid geometry `'208x120' @ geometry.c/ParseRegionGeometry/1322" yet it still produces a 208x120 image with the tiny 16x16 image perfectly centered within the new image and canvas size. Perfect.
However, if I try it with the larger image, it gives me the same error but it actually seems to crop rather than scale down as the "208x120>" implies.
What is that error, how do I fix it and why doesn't this command line work for larger images?
What I'm trying to do is rescale while keeping aspect ratio to around 208x120 then forcing paddding around any extra space to create an exactly 208x120 pixel image. Smaller images should just be place in the center without sizing up and larger images shrunk to the new size.