Equally sized crop problem

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Equally sized crop problem

Post by anthony »

I have backed out your patch and put in my own. It should be released now.

However I now remember why the original delta calculation was changed. When small images were involved, for example when the image was smaller than the number of tiles requested, we were getting crop failures (you can't crop a zero sized image!)

I have now added a minimum delta condition for the next release, so that if the image is smaller than the number of requested tiles, you will get a reduced number of tiles (one pixel dimension)

For example.. trying to get 3 tiles from a two pixel image!

Code: Select all

convert -size 3x1 xc: -crop 3x1@ info:
xc:[0] XC 1x1 2x1+0+0 16-bit DirectClass 0.000u 0:00.000
xc:[1] XC 1x1 2x1+1+0 16-bit DirectClass 0.000u 0:00.000
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply