IM 6.8.2.8 Q16 Mac OSX Snow Leopard
Seems like the auto-cropping is done first, but perhaps it should be done after the deskew.
Input:
This works fine:
convert zelda3_r4.png -deskew 40% show:
But this seems to crop first and then deskew.
convert zelda3_r4.png -set option:deskew:auto-crop 20 -deskew 40% show:
Is this working the way intended?
possible bug -deskew crop IM 6.8.2.8 Q16
Re: possible bug -deskew crop IM 6.8.2.8 Q16
The image is deskewed, then auto-cropped.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -deskew crop IM 6.8.2.8 Q16
This does not look right to me.
Input:
This works fine:
convert zelda3_r4.png -deskew 40% zelda3_r4_deskew.jpg
But this is not what I would expect for a post deskew center crop or shave.
convert zelda3_r4.png -set option:deskew:auto-crop 20 -deskew 40% zelda3_r4_deskew_crop20.jpg
Input:
This works fine:
convert zelda3_r4.png -deskew 40% zelda3_r4_deskew.jpg
But this is not what I would expect for a post deskew center crop or shave.
convert zelda3_r4.png -set option:deskew:auto-crop 20 -deskew 40% zelda3_r4_deskew_crop20.jpg
Re: possible bug -deskew crop IM 6.8.2.8 Q16
Auto-cropping is not an exact science. This command works for this image and may not work for others:
- convert -bordercolor white zelda3_r4.png -set option:deskew:auto-crop 1 -deskew 40% -fuzz 15% -trim show:
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug -deskew crop IM 6.8.2.8 Q16
magick wrote:Auto-cropping is not an exact science. This command works for this image and may not work for others:
- convert -bordercolor white zelda3_r4.png -set option:deskew:auto-crop 1 -deskew 40% -fuzz 15% -trim show:
I think I must not understand auto-crop. The docs on the options page say
"Use -set option:deskew:auto-crop width to auto crop the image. The set argument is the pixel width of the image background (e.g 40)."
So I assumed that width meant the amount of trimming to be done something like -shave.
I will discuss with you offline and perhaps I can update the docs once I understand more what it is doing.
Fred
Re: possible bug -deskew crop IM 6.8.2.8 Q16
The pixel width is the amount of the pixels around the border of the image to use when determining the image background color. If the image border is not consistent, auto-cropping will not work.