Re: [PyQt] Returning a QImage instance from SIP

2010-08-16 Thread Phil Thompson
On Mon, 16 Aug 2010 11:38:06 +0100, Jeremy Sanders wrote: > Hello - is this the correct way to return a QImage from a SIP MethodCode? > > QImage numpyToQImage(SIP_PYOBJECT, SIP_PYOBJECT, bool forcetrans = false); > %MethodCode > { >try > { >Numpy2DObj data(a0); >Numpy2D

[PyQt] Returning a QImage instance from SIP

2010-08-16 Thread Jeremy Sanders
Hello - is this the correct way to return a QImage from a SIP MethodCode? QImage numpyToQImage(SIP_PYOBJECT, SIP_PYOBJECT, bool forcetrans = false); %MethodCode { try { Numpy2DObj data(a0); Numpy2DIntObj colors(a1); QImage *img = new QImage( numpyToQImage(data, color