Page 1 of 1

Image Geometry ^ tag

Posted: 2009-07-31T09:43:12-07:00
by RLGyde
Test file: hatching_orig.jpg
Version of ImageMagick: ImageMagick-6.5.4-6-Q16-windows-dll.exe

Trying to use the Cut the Image to Fit as described in the link.
I did start out using syntax for Cut the Image to Fit, but then I did start to try other things...

This two lines of code give me the same output picture (witch is 100x75).

Code: Select all

convert hatching_orig.jpg -thumbnail 100x100 thumbnail.png
convert hatching_orig.jpg -thumbnail 100x100^ thumbnail.png
command-line-options wrote:widthxheight^ Minimum values of width and height given, aspect ratio preserved.
As I understand this, the output from 100x100^ out to be bigger than 100 on both sides?

While testing I did find out that moving "-gravity center" up before "-thumbnail", that got the "-gravity center" to work.

Code: Select all

convert hatching_orig.jpg -gravity center -thumbnail 100x100^ -extent 100x100 thumbnail.png
Is it a bug or am I just not using convert the right way?

regards

Re: Image Geometry ^ tag

Posted: 2009-07-31T10:08:34-07:00
by Bonzo
Try:

Code: Select all

convert hatching_orig.jpg -thumbnail 100x100^^ thumbnail.png
http://www.imagemagick.org/Usage/windows/

Re: Image Geometry ^ tag

Posted: 2009-07-31T14:44:37-07:00
by fmw42
The double ^ is only needed on Windows as ^ is an escape. On Unix, it would be \^.

The resize flag 100x100^, tells resize to make the smaller dimension of the input be 100. So it depends upon which is smaller the width or height of the input what you will get. If both width and height are the same, then this flag is not needed.

see http://www.imagemagick.org/script/comma ... p#geometry

Re: Image Geometry ^ tag

Posted: 2009-08-02T04:18:53-07:00
by RLGyde
Tanks, the escape where the problem!

Not use to working on a windows server, tnx for the help!