[Qt-interest] how to read bitmap emdedded in XML

Andre Somers andre at familiesomers.nl
Tue Aug 17 20:45:28 CEST 2010


  Hi,

Op 17-8-2010 19:49, Atlant Schmidt schreef:
> Eckhard:
>
>    There's:
>
>       QImage::loadFromData( const uchar * data,
>                             int len,
>                             const char * format = 0 )
>
>
>    That looks like it's close to what you want, except
>    that it delivers a QImage instead of a QPixmap.
I was more thinking about QImage::fromData(const QByteArray& data, char* 
format = 0). And since you know the format from the file name...
> But then...
>
>      http://doc.trolltech.com/3.3/qpixmap.html
Qt 3.3? Let's keep that version where it belongs: in the Troll Museum :-)

>      There are (slow) functions to convert between
>      QImage and QPixmap: convertToImage() and
>      convertFromImage().
>
>    ...if you really need the pixmap and not the image.
Depends on the platform and rendering engine you use. If you use the 
rasterengine, it's not that slow anymore.

André

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100817/05682aff/attachment.html 


More information about the Qt-interest-old mailing list