[PyKDE] Pixel from a QImage

Andreas Pakulat apaku at gmx.de
Sun Apr 16 09:44:03 BST 2006


On 16.04.06 00:53:16, Aurel (DustyDingo) W. wrote:
> Hi,
> 
> while programming a little application, that does painting with
> QPainter i ran into serious problems and now I am completely stuck. I
> need the color of a distinct Pixel from a QPixmap. It is common, that
> QPixmap doesn't implement a function for this, so i must convert it
> into a QImage, which offers a function called pixel(int,int)
> 
>  QRgb QImage::pixel ( int x, int y ) const
> 
> Clear and brief, doesn't work with PyQt (3.14.1-r1). The binding for
> the function seems to work, but it allways returns -16777118 (yes, an
> integer)

I think you should try to update to a more recent PyQt version, 3.14 is
pretty old by now. 

It works here with a current snapshot and I do believe it also works
with the last release 3.16.

Andreas

-- 
You will be advanced socially, without any special effort on your part.




More information about the PyQt mailing list