Jump to content

crop an image?


 Share

Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 years later...

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...