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?".
The handful of forum results don't help with this issue. I have an image that is being de-skewed by about 5%. This rotates the image and leaves solid colors where data didn't exist. I cannot seem to get auto-crop to work, at all.
What is your IM version and platform? Please always provide that, since syntax differs. Can you post your image to some free hosting service so we can examine and test. You can then put the URL here.
Masejoer wrote:The handful of forum results don't help with this issue. I have an image that is being de-skewed by about 5%. This rotates the image and leaves solid colors where data didn't exist. I cannot seem to get auto-crop to work, at all.
In my tests I found that a white background worked well with 40%, but a black background did not and needed 30% to work. So try other values for your green background.
though that may leave some background. If so, then add -shave ZZxZZ after -trim, where XX is deskew percent, YY is a small fuzz percent and ZZ is in pixels.
fmw42 wrote:From my experience -deskew does not work well for angle above about 5% and probably not well also if the sides are not straight
I've had great luck running the deskew to get the images straight, and extremely angles (40 degrees) if I deskew twice. I just can't get good consistent cropping from the deskewed output - perspective distortion being the worst. I'm still amazed at how well imagemagick generally does on most things.
Does anyone know the real difference between "-deskew 40%" and "-deskew 40"? Some images deskew perfect with 40%, while others only deskew with "40". "40%" will just fail to deskew if it can't get a straight line, "40" will simply rotate the image a lot if not successful.