Consecutive Crops Fail

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
docjones2
Posts: 11
Joined: 2011-07-27T15:42:04-07:00
Authentication code: 8675308

Consecutive Crops Fail

Post by docjones2 »

hello,

There is a bug pertaining to images with more than one crop tag in them. Consider the code

Code: Select all

<?xml version="1.0"?>
   <group> 
      <image>
         <read filename="horsefly.jpg" />
         <crop geometry="250x250"/>
         <rotate degrees="90"/>
         <crop geometry="100x100"/>
      </image>
      <write filename="msl_test.png"></write>
   </group>
This will result in the 1x1 pixel error image. Removing the rotate for some reason causes the image to output a 100x100 crop as expected, however if gravity is set at anytime before the first crop, removing the rotate will have no affect and the output image will always be the 1x1 pixel error. Other combinations of crop with and without gravity produce images with strange dimensions. On numerous occasions when asking for a 100x100 crop, I have seen images with seemingly unpredictable dimensions (always less than 100x100) returned.

The convert command's crop function works as expected, returning the asked for crop with the correct dimensions always. I have not investigated the msl source code to determine what is causing this bug.
Post Reply