[Qt-interest] Painting on QImage vs. QPixmap

Brad Howes howes at ll.mit.edu
Tue Mar 24 18:14:22 CET 2009


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, QPixmap,  
> QBitmap and QPicture. QImage 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 is only a  
> convenience class that inherits QPixmap, ensuring a depth of 1. The  
> isQBitmap() function returns true if a QPixmap object is really a  
> bitmap, otherwise returns false. Finally, the QPicture class is a  
> paint device that records and replays QPainter 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




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090324/e18c7998/attachment-0001.html 


More information about the Qt-interest-old mailing list