[magick-users] -deskew with autocrop

imagemagick.20.andromodon at spamgourmet.com imagemagick.20.andromodon at spamgourmet.com
Sat Mar 28 12:57:30 PDT 2009


Hello!  I am trying to use imagemagick to automatically rotate and crop
a scanned image (the scanned page is a little bit crooked).  The
documentation for the '-deskew' option states:

-----------------


        -deskew /threshold/

straighten an image. A threshold of 40% works for most images. 	

Use -set
<http://www.imagemagick.org/script/command-line-options.php#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).

-----------------

It is the note at the bottom that intregues me.  I can't seem to get it
to work though.  Here are two commands (out of like 40) that I've tried
so far:

$ convert -deskew '40%' -set 'option:deskew:auto-crop 10' scan9.pnm
scan92.pnm
convert: missing an image filename `scan92.pnm' @
wand/convert.c/ConvertImageCommand/2710.

and:
$convert -set 'option:deskew:auto-crop 10' scan9.pnm scan92.pnm
convert: missing an image filename `scan92.pnm' @
wand/convert.c/ConvertImageCommand/2710.

Do any of you know how to do this?  If not, do you know how to
successfully find how to do it? :)

Thank you!

~Andy





More information about the Magick-users mailing list