Jump to content
Sign in to follow this  
jftuga

crop an image?

Recommended Posts

jftuga

I would like to write a program to crop an image by using imagemagick on the back-end to do the actual file manipulation and au3 for the front-end. The AutoIt UI would consist of loading a jpg with GUICtrlCreateGraphic() (or is there a better way?). Once this is loaded onto the screen, the user would click 2 points, upper left and lower right. A rectangle would be drawn with GUICtrlSetGraphic() on top of the image so that the user can see what has been cropped. Unfortunately, these 2 functions are incompatible. How can I do this in AutoIt? Once I get the 2 coordinates, then I can use RunWait() and pass these numbers off to the imagemagick convert program.

Any help would be greatly appreciated.

Thanks,

-John

Share this post


Link to post
Share on other sites
SmOke_N

I would like to write a program to crop an image by using imagemagick on the back-end to do the actual file manipulation and au3 for the front-end. The AutoIt UI would consist of loading a jpg with GUICtrlCreateGraphic() (or is there a better way?). Once this is loaded onto the screen, the user would click 2 points, upper left and lower right. A rectangle would be drawn with GUICtrlSetGraphic() on top of the image so that the user can see what has been cropped. Unfortunately, these 2 functions are incompatible. How can I do this in AutoIt? Once I get the 2 coordinates, then I can use RunWait() and pass these numbers off to the imagemagick convert program.

Any help would be greatly appreciated.

Thanks,

-John

I'd have a look at PaulIA's A3L library in the Example Scripts personally.... dig through those to see if you can mesh together what you are looking at doing.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
ptrex

Share this post


Link to post
Share on other sites
jftuga

ptrex,

I agree about using imagemagick. But I would like to have a visual AU3 frontend to make it easier to get the coordinates. Once the user clicks on these (upperleft & bottomright), I can pass these values to the imagemagick command-line program via RunWait().

Any ideas on how to do this?

Thanks,

-John

Share this post


Link to post
Share on other sites
ptrex
inzam

if you want crop any image, than i will suggest you to visit the link below

http://www.raiseitsolutions.com/forum/viewtopic.php?f=4&t=2

if you visit this link, you will know how to crop an image easily

thank you very much. :x

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.