diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-06-29 15:28:19 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-06-30 12:45:57 (GMT) |
commit | c16162214eb8757a62e221c34d38cefc402e5b05 (patch) | |
tree | aa93778c76ca43ef14143fcc56864a3d93b703dc /src/gui/image/qpixmap.h | |
parent | 6ea8ad02e1929f98744f7b18f20fa91223cb4398 (diff) | |
download | Qt-c16162214eb8757a62e221c34d38cefc402e5b05.zip Qt-c16162214eb8757a62e221c34d38cefc402e5b05.tar.gz Qt-c16162214eb8757a62e221c34d38cefc402e5b05.tar.bz2 |
Add QPixmap::fromImageReader() to decode arbitrary images in place.
Decoding in-place with QPixmap::fromData() has limitations, it cannot
be used with animated gif images, and the user has no control over the
parameters of the image reader.
Reader the image directly from the image reader allow us to do a better
job when loading images.
Reviewed-by: Simon Hausmann
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/image/qpixmap.h')
-rw-r--r-- | src/gui/image/qpixmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index 82546da..64ca8a3 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -62,6 +62,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) class QImageWriter; +class QImageReader; class QColor; class QVariant; class QX11Info; @@ -134,6 +135,7 @@ public: QImage toImage() const; static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor); + static QPixmap fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags = Qt::AutoColor); bool load(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); bool loadFromData(const uchar *buf, uint len, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); |