CopperSpice API
1.9.2
|
A CopperSpice application can load and save images using the QImage and QPixmap classes. The most common image formats are built into CopperSpice.
If you want to use one of the following formats you will need to provide one of the following plugins.
Users can add support for additional formats via the QImageIOPlugin class. This is done by deriving from the QImageIOHandler class and creating a QImageIOPlugin object which is a factory for creating QImageIOHandler objects. When the plugin is installed QImageReader and QImageWriter will automatically load the plugin and start using it.
There are three different ways to load an image and they are each optimized for different use cases.
The QImageWriter class supports setting format specific options, such as the gamma level, compression level and quality, prior to storing the image. If you do not need such options, you can use QImage::save() or QPixmap::save() instead.
The QImageReader and QImageWriter classes rely on the QImageIOHandler class which is the common image I/O interface for all image formats. QImageIOHandler objects are used internally by QImageReader and QImageWriter to add support for different image formats.