Re: painting raw u16 memory
Quote:
Originally Posted by stinos
I'd guess my best bet would be to pass the whole memory block to a QImage, but I can't figure out which flags I'd have to use, I don't get anything usable back from it.
Try QImage::loadFromData(). If you're using Qt4 (or its embedded equivalent) you might want to implement your own paint engine.
Re: painting raw u16 memory
Using Qt4 I can get close indeed: if I fill an unsigned int buffer with all pixels converted to QRGB format, and use the QImage( uchar* data, int w, int h, Format format ) constructor with format = Format_RGB32 it works quite ok (I'm loosing color info due to conversion from 565 - > QRGB)
Appearantly I should have Qtopia Core: that has a QImage::Format_RGB16 flag that uses the 565 scheme, so there it would just be a matter of constructing the QImage and painting it, without any conversions needed..