PDA

View Full Version : QImage copy



paolom
13th September 2010, 14:35
Hi,

I have a QImage with an existing uchar * buffer.

If I make:



qimage = qimage.scaled(..);


the qimage buffer is the same, or I need to delete the previous buffer ?

thanks

wysota
13th September 2010, 15:17
QImage::scaled() makes a deep copy of the image. The new image will have its own (new) buffer.

paolom
13th September 2010, 15:24
Yes, but the new buffer of the scaled image, it is managed by the qimage or I need to delete it after the image destruction?

wysota
13th September 2010, 15:32
It is managed by QImage instance.

oliverliu.hz
10th February 2011, 05:59
you need not delete it manually.