Remove areas exposed by deskew?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
psmith
Posts: 1
Joined: 2015-03-13T18:58:48-07:00
Authentication code: 6789

Remove areas exposed by deskew?

Post by psmith »

After running this command:

Code: Select all

convert -deskew 40% -background green in.jpg out.jpg
out.jpg will have a non-uniform green area that corresponds to the amount of skew corrected. How do I remove this area?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Remove areas exposed by deskew?

Post by snibgo »

You should have input-file, then the processing, then the output file.

Code: Select all

convert in.jpg -background green -set option:deskew:auto-crop 1 -deskew 40% -fuzz 5% -trim +repage out.jpg
The 5% and "1" might need tweaking.
snibgo's IM pages: im.snibgo.com
andreibexa
Posts: 1
Joined: 2017-03-30T12:54:46-07:00
Authentication code: 1151

Re: Remove areas exposed by deskew?

Post by andreibexa »

I am using an OCR script - Tesseract. I didn't know how to align or rotate a text, to be perfect aligned horizontaly. Your script works great !

Code: Select all

convert in.jpg -set option:deskew:auto-crop 1 -deskew 40% -fuzz 5% -trim +repage out.jpg
Thank you so much ! :) :D :)
Post Reply