[Qt-interest] Painting on QImage vs. QPixmap

Jesús Fernández jsfdez at gmail.com
Tue Mar 24 18:25:05 CET 2009


Because QPixmap is designed to use it as a QPaintDevice.

2009/3/24 Brad Howes <howes at ll.mit.edu>

>
> On Mar 24, 2009, at 1:04 PM, Jesús Fernández wrote:
>
> From http://doc.trolltech.com/4.5/qpixmap.html:
>
>
>> Qt provides four classes for handling image data: QImage<http://doc.trolltech.com/4.5/qimage.html>,
>> QPixmap, QBitmap <http://doc.trolltech.com/4.5/qbitmap.html> and QPicture<http://doc.trolltech.com/4.5/qpicture.html>.
>> *QImage <http://doc.trolltech.com/4.5/qimage.html> is designed and
>> optimized for I/O, and for direct pixel access and manipulation, while
>> QPixmap is designed and optimized for showing images on screen.* QBitmap<http://doc.trolltech.com/4.5/qbitmap.html>is only a convenience class that inherits QPixmap, ensuring a depth of 1.
>> The isQBitmap <http://doc.trolltech.com/4.5/qpixmap.html#isQBitmap>()
>> function returns true if a QPixmap object is really a bitmap, otherwise
>> returns false. Finally, the QPicture<http://doc.trolltech.com/4.5/qpicture.html>class is a paint device that records and replays
>> QPainter <http://doc.trolltech.com/4.5/qpainter.html> commands.
>>
> Thanks anyway ;)
>
>
> For what? I knew that blurb but was curious as to the actual circumstances
> when one would be faster than the other. The blurb does not indicate that
> drawing into a QPixmap would be faster than QImage, and yet that can be
> true.
>
> Brad
>
>  --
> Brad Howes
> Group 42
> MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173
> Phone: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420
>
>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090324/6c49b388/attachment.html 


More information about the Qt-interest-old mailing list