Thank you for detailed explanation. It is very helpful.
On Wed, 16 Feb 2005 14:44:09 +0100, Eno <troll@xxxxxxxxxxxx> wrote:
> Therefore, I would do it that way:
> if the app is running in 24 or 32 bpp
> (i) i would use an external jpeg-decoder-library to decode the data
> into memory at 24 or 32 bpp respectively. jpeg decoders, that come to
> mind, are libjpeg, and Intel's jpeg libraries (even tho I haven't tried
> the latter; it is said to be optimized for sse/mmx/whatever.)
> (ii) contruct a pixmap off that memory area, using
> QPixmap::QPixmap( int w, int h, const uchar *bits, bool )
> This still involves a memory copy, which is bad. Therefore, if I was a
> commercial developer, I would ask trolltech to provide a QPixmap
> c'tor, that reuses the memory passed in the c'tor. But I am not...
> (iii) Now that you have a QPixmap with the proper contents you can use
> > void bitBlt(QPaintDevice*, const QPoint&, const QPaintDevice*,
> > const QRect&, RasterOp)
> to put it on screen.
According to QT document, QPixmap::QPixmap( int w, int h, const uchar
*bits, bool ) is protected, and is uesd to "construct a monochrome
pixmap". Well, I can inherit from QPixmap to work around the
"pretected" problem. But, how can I construct a 24bits image?
List archive and information: http://lists.trolltech.com/qt-interest/