7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qbytearray.h>
9#include <QtCore/qcoreapplication.h>
10#include <QtCore/qlist.h>
11#include <QtGui/qimageiohandler.h>
22 Q_DECLARE_TR_FUNCTIONS(QImageWriter)
24 enum ImageWriterError {
27 UnsupportedFormatError,
64 void setText(
const QString &key,
const QString &text);
67 bool write(
const QImage &image);
79 Q_DISABLE_COPY(QImageWriter)
80 QImageWriterPrivate *d;
\inmodule QtCore\reentrant
QString errorString() const
Returns a human readable description of the last error that occurred.
void setDevice(QIODevice *device)
Sets QImageReader's device to device.
int quality() const
Returns the quality setting of the image format.
QString fileName() const
If the currently assigned device is a QFile, or if setFileName() has been called, this function retur...
QImageIOHandler::Transformations transformation() const
QIODevice * device() const
Returns the device currently assigned to QImageReader, or \nullptr if no device has been assigned.
QByteArray subType() const
bool supportsOption(QImageIOHandler::ImageOption option) const
Returns true if the reader supports option; otherwise returns false.
QList< QByteArray > supportedSubTypes() const
QByteArray format() const
Returns the format QImageReader uses for reading images.
void setQuality(int quality)
Sets the quality setting of the image format to quality.
ImageReaderError error() const
Returns the type of error that occurred last.
The QImageWriter class provides a format independent interface for writing images to files or other d...
QImageWriter(const QString &fileName, const QByteArray &format=QByteArray())
Constructs a QImageWriter objects that will write to a file with the name fileName,...
QImageWriter()
Constructs an empty QImageWriter object.
void setCompression(int compression)
This is an image format specific function that set the compression of an image.
bool write(const QImage &image)
Writes the image image to the assigned device or file name.
bool canWrite() const
Returns true if QImageWriter can write the image; i.e., the image format is supported and the assigne...
void setTransformation(QImageIOHandler::Transformations orientation)
QImageWriter(QIODevice *device, const QByteArray &format)
Constructs a QImageWriter object using the device device and image format format.
static QList< QByteArray > supportedMimeTypes()
Returns the list of MIME types supported by QImageWriter.
void setSubType(const QByteArray &type)
void setFileName(const QString &fileName)
Sets the file name of QImageWriter to fileName.
bool optimizedWrite() const
bool progressiveScanWrite() const
static QList< QByteArray > imageFormatsForMimeType(const QByteArray &mimeType)
void setOptimizedWrite(bool optimize)
static QList< QByteArray > supportedImageFormats()
Returns the list of image formats supported by QImageWriter.
int compression() const
Returns the compression of the image.
void setFormat(const QByteArray &format)
Sets the format QImageWriter will use when writing images, to format.
void setProgressiveScanWrite(bool progressive)
void setText(const QString &key, const QString &text)
Sets the image text associated with the key key to text.
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Combined button and popup list for selecting options.
Q_TRACE_METADATA(qtcore, "ENUM { AUTO, RANGE User ... MaxUser } QEvent::Type;")
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
static QImage rotated90(const QImage &src)
static void copyMetadata(QImage *dst, const QImage &src)
static void copyMetadata(QImageData *dst, const QImageData *src)
static int next_qimage_serial_number()
#define QIMAGE_SANITYCHECK_MEMORY(image)
static void copyPhysicalMetadata(QImageData *dst, const QImageData *src)
static QImage rotated270(const QImage &src)
QMap< QString, QString > qt_getImageText(const QImage &image, const QString &description)
Q_GUI_EXPORT void qt_imageTransform(QImage &src, QImageIOHandler::Transformations orient)
static QImage rotated180(const QImage &src)
static Qt::Orientations toOrientations(QImageIOHandler::Transformations orient)
QMap< QString, QString > qt_getImageTextFromDescription(const QString &description)