[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] loading a numarray into QPixmap
From:       Solly Brown <sollyb () cse ! unsw ! edu ! au>
Date:       2004-11-02 9:32:52
Message-ID: Pine.LNX.4.61.0411022024170.1067 () serpent ! orchestra ! cse ! unsw ! EDU ! AU
[Download RAW message or body]

Hi people,

Does anyone know how I can convert the data in my 2D numarray into a 
QImage or QPixmap format?

(That is, without iterating over all the elements of the array and slowly 
reading each element into the QImage pixel by pixel).

If not, it would be a very handy function to incorporate some time. I note 
that you can do it in PyQwt.

Thanks for any ideas........ Solly

ps. I know you can via the PIL library format, but is there a more direct 
way?
pps. I've tried using the array tostring() method, but QPixmap doesn't 
seem to like it when I do a loadFromData using the binary string

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic