[wx] Simple image editor

Michele Petrazzo michele.petrazzo at TOGLIunipex.it
Tue Nov 2 09:22:52 CET 2004


Cliff Wells wrote:
> 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.  

Ok. I'll divide all my "objects" into a lot of bitmaps.

> 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. 
I'm using yet both wxPython and PIL. So the work will not be very hard.

> 
> Regards,
> Cliff
> 

Thanks.
Michele Petrazzo



More information about the Python-list mailing list