O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading

Loading images is very easy. Both QPixmap and QImage have constructors that simply accept a path to a file containing the image. Qt accesses image data through plugins that implement reading and writing operations for different image formats. Without going into the details of plugins, it is enough to say that the default Qt installation supports reading the following image types:

Type Description

BMP

Windows Bitmap

GIF

Graphics Interchange Format

JPG/JPEG

Joint Photography Experts Group

PNG

Portable Network Graphics

PPM/PBM/PGM

Portable anymap

XBM

X Bitmap

XPM

X Pixmap

 

As you can see, the most popular image formats are available. The list can be further extended by installing additional ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required