Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
Working with images
Qt has two classes for handling images. The first one is QImage, more tailored toward direct pixel manipulation. You can check the size of the image or check and modify the color of each pixel. You can convert the image into a different internal representation (say from 8-bit color map to full 32-bit color with a premultiplied alpha channel). This type, however, is not that fit for rendering. For that, we have a different class called QPixmap. The difference between the two classes is that QImage is always kept in the application memory, while QPixmap can only be a handle to a resource that may reside in the graphics card memory or on a remote X server. Its main advantage over QImage is that it can be rendered very quickly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access