Consecutive Crops Fail
Posted: 2012-07-16T11:11:51-07:00
hello,
There is a bug pertaining to images with more than one crop tag in them. Consider the code
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.
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>
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.