Talk:Development/Tutorials/Graphics/Performance: Difference between revisions

From KDE TechBase
(Add talk about QImage vs QPixmap)
 
m (change talk section title to QPixmap vs. QImage to match article section title)
 
Line 1: Line 1:
== QImage vs QPixmap ==
== QPixmap vs. QImage ==


According to this comment from [https://www.reddit.com/user/nezticle nezticle] (Qt Company employee) on [https://www.reddit.com/r/QtFramework/comments/d9m17b/the_detailed_differences_between_qimage_and/f23m64t/ reddit.com/r/QtFramework], there isn't much of a difference between QImage and QPixmap when it comes to rendering since Qt 5:<blockquote>So it may be important to point out, but in Qt 5 QPixmap is almost always a QImage. This was important in Qt 4 when we had multiple paint engines and then QPixmap was the "native" image format for the platform you were running on. There is only one case I can think of where QPixmap is not a QImage and that is when you are using the DirectFB platform plugin (which is probably busted at this point, and definitely legacy code). There QPixmap is a bona fide native surface (DFBSurface), but asside from that there is no real reason to use QPixmap over QImage in Qt 5, aside from signaling to the user of an API that they shouldn't modify the pixel data directly.</blockquote>--[[User:Ndavis|Ndavis]] ([[User talk:Ndavis|talk]]) 14:04, 14 January 2024 (UTC)
According to this comment from [https://www.reddit.com/user/nezticle nezticle] (Qt Company employee) on [https://www.reddit.com/r/QtFramework/comments/d9m17b/the_detailed_differences_between_qimage_and/f23m64t/ reddit.com/r/QtFramework], there isn't much of a difference between QImage and QPixmap when it comes to rendering since Qt 5:<blockquote>So it may be important to point out, but in Qt 5 QPixmap is almost always a QImage. This was important in Qt 4 when we had multiple paint engines and then QPixmap was the "native" image format for the platform you were running on. There is only one case I can think of where QPixmap is not a QImage and that is when you are using the DirectFB platform plugin (which is probably busted at this point, and definitely legacy code). There QPixmap is a bona fide native surface (DFBSurface), but asside from that there is no real reason to use QPixmap over QImage in Qt 5, aside from signaling to the user of an API that they shouldn't modify the pixel data directly.</blockquote>--[[User:Ndavis|Ndavis]] ([[User talk:Ndavis|talk]]) 14:04, 14 January 2024 (UTC)

Latest revision as of 14:06, 14 January 2024

QPixmap vs. QImage

According to this comment from nezticle (Qt Company employee) on reddit.com/r/QtFramework, there isn't much of a difference between QImage and QPixmap when it comes to rendering since Qt 5:

So it may be important to point out, but in Qt 5 QPixmap is almost always a QImage. This was important in Qt 4 when we had multiple paint engines and then QPixmap was the "native" image format for the platform you were running on. There is only one case I can think of where QPixmap is not a QImage and that is when you are using the DirectFB platform plugin (which is probably busted at this point, and definitely legacy code). There QPixmap is a bona fide native surface (DFBSurface), but asside from that there is no real reason to use QPixmap over QImage in Qt 5, aside from signaling to the user of an API that they shouldn't modify the pixel data directly.

--Ndavis (talk) 14:04, 14 January 2024 (UTC)