Cropping bug with tif, png... ImageMagick 6.4.5 to 6.5.7
Posted: 2009-10-23T14:47:42-07:00
With this image:
http://tinyurl.com/TryCropThis-tif
Try doing a:
convert -crop 950x330 TryCropThis.tif Cropped.tif
or even a:
convert -crop 950x330+1+1 TryCropThis.tif Cropped.tif
And you will notice that Cropped.tif is cropped far smaller vertically than specified.
Then try in PNG format:
convert TryCropThis.tif TryCropThis.png
convert -crop 950x330+1+1 TryCropThis.png Cropped.png
Same problem.
However, if you convert instead to JPG, then the crop is correct!
convert TryCropThis.tif TryCropThis.jpg
convert -crop 950x330+1+1 TryCropThis.jpg Cropped.jpg
No problem when using GIF format either.
This was done initially with ImageMagick 6.4.5 provided for Ubuntu Jaunty 9.04. I then deleted the distribution's version and compiled ImageMagick 6.5.7 to reproduce the problem.
Thanks for any pointer as to where to look in the source code in order to debug this problem.
-Thomas
http://tinyurl.com/TryCropThis-tif
Try doing a:
convert -crop 950x330 TryCropThis.tif Cropped.tif
or even a:
convert -crop 950x330+1+1 TryCropThis.tif Cropped.tif
And you will notice that Cropped.tif is cropped far smaller vertically than specified.
Then try in PNG format:
convert TryCropThis.tif TryCropThis.png
convert -crop 950x330+1+1 TryCropThis.png Cropped.png
Same problem.
However, if you convert instead to JPG, then the crop is correct!
convert TryCropThis.tif TryCropThis.jpg
convert -crop 950x330+1+1 TryCropThis.jpg Cropped.jpg
No problem when using GIF format either.
This was done initially with ImageMagick 6.4.5 provided for Ubuntu Jaunty 9.04. I then deleted the distribution's version and compiled ImageMagick 6.5.7 to reproduce the problem.
Thanks for any pointer as to where to look in the source code in order to debug this problem.
-Thomas