summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-30 13:28:49 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-07-30 13:28:49 (GMT)
commita08b3f5336e5c819b33d922d3a809b5203d728f3 (patch)
tree952f42304d50f28ed6651bace587ab7935b29cd0 /src/gui/image
parent813fc3574a006cb2687715ccf7bdb984a485b173 (diff)
parent188ac02e2fb6cc6437b776f8c5b69a508728fbdb (diff)
downloadQt-a08b3f5336e5c819b33d922d3a809b5203d728f3.zip
Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.tar.gz
Qt-a08b3f5336e5c819b33d922d3a809b5203d728f3.tar.bz2
Merge commit 'qt/master-stable'
Conflicts: demos/demos.pro src/gui/graphicsview/qgraphicsitem_p.h
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 d71aef3..9a1380e 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4639,12 +4639,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);