Re: [PyQt] QImage with a trapezoid draw result [solved]

2008-04-28 Thread Sergi Blanch i Torné
Hi at last! The reason has been found. The image that I was try to draw is not 32-bit aligned... It means the constructor call: QtGui.QImage (data,width,height,format) generates this trapezoid because the image is 1034*779 (the full ccd detector). Selecting a region of interest we found a good d

Re: [PyQt] QImage with a trapezoid draw result

2008-04-22 Thread Sergi Blanch i Torné
Hi again, I have new information over the trapezoidal problem. The ccd camera is giving the images on 12 bits and it means this has to be an unsigned short image and the conversion to unsigned char breaks the rows and columns. As I read in the QImage class documentation the 12 bit grayscale is

[PyQt] QImage with a trapezoid draw result

2008-04-16 Thread Sergi Blanch i Torné
Hi! I'm try to show an image on a widget but the image appears distorted. This widget is receiving images by events with a method where the dimensions has also to be sent: def eventReceived(self, EventSource, EventType, EventValue): self._imagedata = array.array('B',Even