IM 6.4.2-4 Q16 Mac OSX Tiger
I ran into these issues when trying to extract the last row and column from an image, BUT using the wrong offset that was one pixel outside the bounds of the image. I expected an error message and no image to be generated. I do not know if these are what you would expect or want to have happen, but I thought I would pass this on.
identify rose:
rose:=>ROSE ROSE 70x46 70x46+0+0 8-bit DirectClass 9.45kb
Try to get bottom row, but actually +46 is one row past the bottom
convert rose:[70x1+0+46] rose_bottom.png
convert: No IDATs written into file `rose_bottom.png' @ png.c/PNGErrorHandler/1412.
The above produces an image that cannot be opened
Try to get right column, but actually +70 is one column past the right side
convert rose:[1x46+70+0] rose_right.png
The above does not give an error and produces and image identical to the original
Thus I am getting somewhat inconsistent kinds of error/results
possible bugs with subsection and cropping IM 6.4.2-4
Re: possible bugs with subsection and cropping IM 6.4.2-4
We can reproduce the problem you posted and have a patch in ImageMagick 6.5.2-5 Beta to fix the problem. Thanks.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bugs with subsection and cropping IM 6.4.2-4
NOTE you probably should have quotes around the square brackets, to protect them from some shells. However I verified that the problem happens.
What should have happens is you get an crop error, and a single pixel 'NULL:' missed image should be generated.
However even the normal crop for some reason fails with the wrong error...
If I take out the PNG save,
I get no error or even a warning!!!! That is also bug in IM looks like a bounray condition failure as changing 46 to 47 produces the correct error...
What should have happens is you get an crop error, and a single pixel 'NULL:' missed image should be generated.
However even the normal crop for some reason fails with the wrong error...
Code: Select all
convert rose: -crop 70x1+0+46 rose_bottom.png
Looks like a fatal error in the PNG coder module.convert: No IDATs written into file `rose_bottom.png' @ png.c/PNGErrorHandler/1412.
If I take out the PNG save,
Code: Select all
convert rose: -crop 70x1+0+47 null:
Code: Select all
convert rose: -crop 70x1+0+47 null:
convert: geometry does not contain image `ROSE' @ transform.c/CropImage/507.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/