Image grab in Python

Valerio Valerio vdv100 at gmail.com
Sun May 4 14:20:07 EDT 2008


2008/5/4 David <wizzardx at gmail.com>:

> > What I want is display a window with a image, the user select a region
> of
> > the image, and the region value is passed to my program, my program
> slice
> > the image region, and analyze it.
> >
>
> If it's your apps own window, then getting a rectangle selected by the
> user is simple.
>
> 1) Make skeleton x/gtk/wx/qt/etc app
> 2) Add code to show an image
> 3) Add code to capture mouse events
> 4) Add code to show the 'rubber band' rectangle over the mouse selection
> area
> 5) When the user releases the mouse, then extract the part of the
> rectangle between where a mouse button was clicked and where it was
> released.
>
> All this would be in the docs for the Python x/gtk/wx/qt/etc libs.
> Where is the difficulty?


Right now I don't have any difficulty :)
I just asked for a library to do that, if exist I don't have to write all
the things from scratch (the selection part), but I am able to do my tasks
easily with Xlib or Pygame.

Thanks for the help.

Cheers,

-- 
Valério Valério

http://www.valeriovalerio.org


>
> David.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080504/b7aa93d9/attachment-0001.html>


More information about the Python-list mailing list