[wx] Simple image editor

Cliff Wells clifford.wells at comcast.net
Sat Oct 30 11:43:52 CEST 2004


On Sat, 2004-10-30 at 11:28 +0200, Michele Petrazzo wrote:
> I want to create a simple image editor (with wxPython) for my application.
> Now I'm able to zoom, draw with a pen, insert a text into the loaded 
> image, and undo changes (for this I reload the image and redraw all the 
> lines/text, but not the last.)
> 
> My problem is how can I move the texts/lines that are insert into Image, 
> after placed? How the image editors (like GIMP) are able to move the 
> objects? Please don't tell me to read the GIMP's source :).

First of all, if you are talking about bitmaps, then there are no such
things as "objects" in that sense, there is only a big bunch of bits.
What programs like the Gimp do is keep several (possibly hundreds) of
separate bitmaps for each of the objects and then composite them
together to give you a unified view of your "bitmap".  So the first
thing you'll need is a framework for managing all those objects.  This
should be fairly straightforward in Python.  Second, you can use the
built-in wxPython image handling tools or take a look at something like
PIL for doing the compositing. 



Regards,
Cliff

-- 
Cliff Wells <clifford.wells at comcast.net>




More information about the Python-list mailing list