(VB6) Deskew with Autocrop

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
kegscruiser
Posts: 3
Joined: 2012-02-28T19:47:31-07:00
Authentication code: 8675308

(VB6) Deskew with Autocrop

Post by kegscruiser »

Hi,

I'm able to successfully deskew images using the following:
IM2 = IMimage2.Convert("c:\test\in.tif", "-deskew=40", "c:\test\out.tif")

But i'm not able to get the auto-crop option to work using the '-set' command:
IM2 = IMimage2.Convert("c:\test\in.tif", "-set option:deskew:auto-crop=40", "c:\test\out.tif")

Has anyone used the '-set' command with options ? If so would you please share the correct syntax.


Many thanks...
Werty
Posts: 66
Joined: 2010-08-06T05:37:36-07:00
Authentication code: 8675308

Re: (VB6) Deskew with Autocrop

Post by Werty »

You need each command/option in their own quotes, while I havent tried using the -set option I believe it should look something like this...

IM2 = IMimage2.Convert("c:\test\in.tif", "-set","option:deskew:auto-crop=40", "c:\test\out.tif")

...if indeed the "option:deskew:auto-crop=40" syntax is correct, others may chime in on that.
Windows 7 user
kegscruiser
Posts: 3
Joined: 2012-02-28T19:47:31-07:00
Authentication code: 8675308

Re: (VB6) Deskew with Autocrop

Post by kegscruiser »

Hi Werty,

Thanks for the reply, unfortunately that was one of the syntax's that I had previously tried.
You are correct about multiple commands in their own 'quotes' however I'm starting to think that the 'option' part of the statement is not formed correctly. (option:deskew:auto-crop).


Cheers...
Post Reply