[PyQt] QImage, transparent.

Matt Smith melkor at orangepalantir.org
Tue Jan 20 20:49:18 GMT 2009


> El 19/01/2009, a las 21:20, Matt Smith escribi:
> 
> > I want to be able to draw lines on an image, without modifying the
> > image.  More specifically I want two images one with the lines and  
> > then
> > the original image below it.  Can somebody recommend some classes,
> > preferable I would like to use 2 QImages, but I don't know if I can
> > display one on top of the other.
> 
> 
> You can draw a QImage on top of another with QPainter if it has alpha  
> channel. But anyway you will be drawing on one of them, so possibly  
> you need to create a third one with the result of the combination, if  
> you want to keep the two other intact.

That works pretty good so far, I might need a third one if I want to
save the file afterwards. 



More information about the PyQt mailing list