From f85f3acd7878f49f0878644905ca27ceb7bc0775 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 26 Aug 2014 09:23:43 +0200 Subject: Document loading of high resolution versions of images. Task-number: QTBUG-38858 Change-Id: I87ee18b66e137f5f5c01d77910f1a7f256b85e18 Reviewed-by: Alessandro Portale --- src/gui/image/qimagereader.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/image/qimagereader.cpp') diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp index 3c75202766..3bf002373c 100644 --- a/src/gui/image/qimagereader.cpp +++ b/src/gui/image/qimagereader.cpp @@ -74,6 +74,8 @@ that occurred, or errorString() to get a human readable description of what went wrong. + \section1 Formats + Call supportedImageFormats() for a list of formats that QImageReader can read. QImageReader supports all built-in image formats, in addition to any image format plugins that support @@ -85,7 +87,19 @@ stream contents. You can enable or disable this feature, by calling setAutoDetectImageFormat(). + \section1 High Resolution Versions of Images + + It is possible to provide high resolution versions of images should a scaling + between \e{device pixels} and \e{device independent pixels} be in effect. + + The high resolution version is marked by the suffix \c @2x on the base name. + The image read will have its \e{device pixel ratio} set to a value of 2. + + This can be disabled by setting the environment variable + \c QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING. + \sa QImageWriter, QImageIOHandler, QImageIOPlugin, QMimeDatabase + \sa QImage::devicePixelRatio(), QPixmap::devicePixelRatio(), QIcon, QPainter::drawPixmap(), QPainter::drawImage(), Qt::AA_UseHighDpiPixmaps */ /*! -- cgit v1.2.3