crop height xor width inconsistency

Discuss the conjure program and the Magick Scripting Language (MSL) here. MSL is an XML-based wrapper to the ImageMagick image-processing functions.
Post Reply
Posts: 11
Joined: 2011-07-27T22:42:04+00:00
Authentication code: 8675308

crop height xor width inconsistency

Post by docjones2 »

This problem involves specifying a single dimension for <crop> (height or width but not both)


Code: Select all

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


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

I see in msl.c

Code: Select all

if ((flags & HeightValue) == 0)

So it would appear that this is in fact the intended behaviour, however it is still inconsistent with the command line.
User avatar
Site Admin
Posts: 11064
Joined: 2003-05-31T18:32:55+00:00

Re: crop height xor width inconsistency

Post by magick »

We'll get a patch into ImageMagick 6.7.1-1 Beta within a day or two to fix the bug. Thanks.
Post Reply