tag:blogger.com,1999:blog-5433088378497538658.post5311104502060471235..comments2023-09-15T08:58:52.880+02:00Comments on dmitryK's blog: Mipmapping for Krita's canvas subsysDmitry Kazakovhttp://www.blogger.com/profile/00589041569298003008noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5433088378497538658.post-47220090002309534942009-07-22T16:12:54.903+03:002009-07-22T16:12:54.903+03:00Thanks for the first comment! =) I didn't know...Thanks for the first comment! =) I didn't know that.Dmitry Kazakovhttps://www.blogger.com/profile/00589041569298003008noreply@blogger.comtag:blogger.com,1999:blog-5433088378497538658.post-55367502201370958732009-07-21T16:57:47.537+03:002009-07-21T16:57:47.537+03:00Also, holy shit it seems Blogger have finally unfu...Also, holy shit it seems Blogger have finally unfucked their commenting system. I rejoice.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5433088378497538658.post-32471825960115731342009-07-21T16:56:13.335+03:002009-07-21T16:56:13.335+03:00I'm not sure if this is what you were asking (...I'm not sure if this is what you were asking (so maybe you already know this), but QImages are stored "client-side", in the application's memory space, whereas QPixmaps are stored "server-side" -- meaning that if you are using Qt's x11 graphics engine, in the X server, or if you are using opengl, probably in video card memory -- and the application only has a handle to it. (With the raster engine, server-side is the application itself, so there's possibly not much difference.)<br /><br />What this means if that if you want to perform some kind of operation on a QPixmap which the "server" doesn't support, you first have to "download" it to the application's memory (by converting to a QImage), perform the operation, and then "upload" it back (by converting back). This can be very slow. On the other hand, for operations which the server does support, it can be hardware-accelerated or have other benefits (with opengl this is obvious, but x11 might do some internal acceleration itself, and other operating systems might have other things). And because the given server is what handles drawing to the screen, drawing pixmaps is fast. On the flipside, on QImages you can perform any kind of operation you want -- this is not accelerated, but done with Qt's raster engine which is generally quite fast (usually even faster than x11). However, if you want to draw a QImage to the screen, you have to upload it to the server, which is slow.<br /><br />Executive summary: If you want to paint it to the screen, use a QPixmap. If you want to do other things with it, use a QImage. If you want to do both, sadly you'll have to engage some brain cells and figure out which (or some kind of scheme with both) would suck less.Anonymousnoreply@blogger.com