Page 1 of 1

crop height xor width inconsistency

Posted: 2011-07-28T11:33:15-07:00
by docjones2
This problem involves specifying a single dimension for <crop> (height or width but not both)

consider

Code: Select all

<crop geometry='x250'/>
it will create and image with a height of 250 and the original width.

however

Code: Select all

<crop geometry='250x'/>
will not create an image with a width of 250 and the original height. Instead it will instead create a square 250x250 image. If this geometry is passed to ParseGravityGeometry, it will also cause gravity to be ignored.

On the command line the correct bahaviour applies.

Setting attribute height xor width instead of using geometry will produce correct output

EDIT:
I see in msl.c

Code: Select all

if ((flags & HeightValue) == 0)
                        geometry.height=geometry.width;

So it would appear that this is in fact the intended behaviour, however it is still inconsistent with the command line.

Re: crop height xor width inconsistency

Posted: 2011-07-28T12:00:51-07:00
by magick
We'll get a patch into ImageMagick 6.7.1-1 Beta within a day or two to fix the bug. Thanks.