summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-28 20:08:25 (GMT)
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-28 20:09:26 (GMT)
commitd0e8341c9a1549dcf1625381a3681d1dca73e945 (patch)
tree78d00e13d592541caa48a07a01790385a7dd9929 /src/gui/image
parent865d5e92b80f8a567746775bb0a1d971af1acf8c (diff)
downloadQt-d0e8341c9a1549dcf1625381a3681d1dca73e945.zip
Qt-d0e8341c9a1549dcf1625381a3681d1dca73e945.tar.gz
Qt-d0e8341c9a1549dcf1625381a3681d1dca73e945.tar.bz2
Doc: Re-apply relevant change from 1368c210ef9976f68eb9fb1c3e4dc14f4fa4edd2
Clarified that the format used in QImage::fromData() is the image format, not the pixel format.
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index dd56765..e8ca7a9 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4628,12 +4628,19 @@ bool QImage::loadFromData(const uchar *data, int len, const char *format)
binary \a data. The loader attempts to read the image using the
specified \a format. If \a format is not specified (which is the default),
the loader probes the file for a header to guess the file format.
+ binary \a data. The loader attempts to read the image, either using the
+ optional image \a format specified or by determining the image format from
+ the data.
- If the loading of the image failed, this object is a null image.
+ If \a format is not specified (which is the default), the loader probes the
+ file for a header to determine the file format. If \a format is specified,
+ it must be one of the values returned by QImageReader::supportedImageFormats().
+
+ If the loading of the image fails, the image returned will be a null image.
+
+ \sa load(), save(), {QImage#Reading and Writing Image Files}{Reading and Writing Image Files}
+ */
- \sa load(), save(), {QImage#Reading and Writing Image
- Files}{Reading and Writing Image Files}
-*/
QImage QImage::fromData(const uchar *data, int size, const char *format)
{
QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(data), size);