PythonQt.QtGui.QImageReader · declarations 002
Back to PythonQt.QtGui.QImageReader
setScaledSize
setScaledSize(size: Any) -> None
X.setScaledSize(size)
Supplemental documentation: Qt 5 reference:
void QImageReader::setScaledSize(const QSize \&size)
Sets the scaled size of the image to size. The scaling is performed after the initial clip rect, but before the scaled clip rect is applied. The algorithm used for scaling depends on the image format. By default (i.e., if the image format does not support scaling), QImageReader will use QImage::scale() with Qt::SmoothScaling.
See also scaledSize(), setClipRect(), and setScaledClipRect().
Upstream PySide2 reference signatures (binding differences may apply):
setScaledSize(self, size: PySide2.QtCore.QSize) -> None
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#setScaledSize
size
size() -> Any
X.size() -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
QSize QImageReader::size() const
Returns the size of the image, without actually reading the image contents.
If the image format does not support this feature, this function returns an invalid size. Qt's built-in image handlers all support this feature, but custom image format plugins are not required to do so.
See also QImageIOHandler::ImageOption, QImageIOHandler::option(), and QImageIOHandler::supportsOption().
Upstream PySide2 reference signatures (binding differences may apply):
size(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#size
subType
subType() -> Any
X.subType() -> PythonQt.QtCore.QByteArray
Supplemental documentation: Qt 5 reference:
QByteArray QImageReader::subType() const
Returns the subtype of the image.
This function was introduced in Qt 5.4.
Upstream PySide2 reference signatures (binding differences may apply):
subType(self) -> PySide2.QtCore.QByteArray
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#subType
supportedImageFormats
supportedImageFormats() -> Any
X.supportedImageFormats()
Supplemental documentation: Qt 5 reference:
[static] QList\<QByteArray> QImageReader::supportedImageFormats()
Returns the list of image formats supported by QImageReader.
By default, Qt can read the following formats:
| Format | MIME type | Description |
|---|---|---|
| BMP | image/bmp | Windows Bitmap |
| GIF | image/gif | Graphic Interchange Format (optional) |
| JPG | image/jpeg | Joint Photographic Experts Group |
| PNG | image/png | Portable Network Graphics |
| PBM | image/x-portable-bitmap | Portable Bitmap |
| PGM | image/x-portable-graymap | Portable Graymap |
| PPM | image/x-portable-pixmap | Portable Pixmap |
| XBM | image/x-xbitmap | X11 Bitmap |
| XPM | image/x-xpixmap | X11 Pixmap |
| SVG | image/svg+xml | Scalable Vector Graphics |
Reading and writing SVG files is supported through the Qt SVG module. The Qt Image Formats module provides support for additional image formats.
Note that the QApplication instance must be created before this function is called.
See also setFormat(), QImageWriter::supportedImageFormats(), and QImageIOPlugin.
Upstream PySide2 reference signatures (binding differences may apply):
supportedImageFormats() -> typing.List[PySide2.QtCore.QByteArray]
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#supportedImageFormats
supportedMimeTypes
supportedMimeTypes() -> Any
X.supportedMimeTypes()
Supplemental documentation: Qt 5 reference:
[static] QList\<QByteArray> QImageReader::supportedMimeTypes()
Returns the list of MIME types supported by QImageReader.
Note that the QApplication instance must be created before this function is called.
See also supportedImageFormats() and QImageWriter::supportedMimeTypes().
Upstream PySide2 reference signatures (binding differences may apply):
supportedMimeTypes() -> typing.List[PySide2.QtCore.QByteArray]
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#supportedMimeTypes
supportedSubTypes
supportedSubTypes() -> Any
X.supportedSubTypes()
Supplemental documentation: Qt 5 reference:
QList\<QByteArray> QImageReader::supportedSubTypes() const
Returns the list of subtypes supported by an image.
This function was introduced in Qt 5.4.
Upstream PySide2 reference signatures (binding differences may apply):
supportedSubTypes(self) -> typing.List[PySide2.QtCore.QByteArray]
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#supportedSubTypes
supportsAnimation
supportsAnimation() -> bool
X.supportsAnimation() -> bool
Supplemental documentation: Qt 5 reference:
bool QImageReader::supportsAnimation() const
Returns true if the image format supports animation; otherwise, false is returned.
This function was introduced in Qt 4.1.
See also QMovie::supportedFormats().
Upstream PySide2 reference signatures (binding differences may apply):
supportsAnimation(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#supportsAnimation
supportsOption
supportsOption(option: Any) -> bool
X.supportsOption(option) -> bool
Supplemental documentation: Qt 5 reference:
bool QImageReader::supportsOption(QImageIOHandler::ImageOption option) const
Returns true if the reader supports option; otherwise returns false.
Different image formats support different options. Call this function to determine whether a certain option is supported by the current format. For example, the PNG format allows you to embed text into the image's metadata (see text()), and the BMP format allows you to determine the image's size without loading the whole image into memory (see size()).
QImageReader reader(":/image.png");
if (reader.supportsOption(QImageIOHandler::Size))
qDebug() << "Size:" << reader.size();
This function was introduced in Qt 4.2.
See also QImageWriter::supportsOption().
Upstream PySide2 reference signatures (binding differences may apply):
supportsOption(self, option: PySide2.QtGui.QImageIOHandler.ImageOption) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#supportsOption
text
text(key: str) -> str
X.text(key) -> str
Supplemental documentation: Qt 5 reference:
QString QImageReader::text(const QString \&key) const
Returns the image text associated with key.
Support for this option is implemented through QImageIOHandler::Description.
This function was introduced in Qt 4.1.
See also textKeys() and QImageWriter::setText().
Upstream PySide2 reference signatures (binding differences may apply):
text(self, key: str) -> str
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#text
textKeys
textKeys() -> tuple
X.textKeys() -> tuple
Supplemental documentation: Qt 5 reference:
QStringList QImageReader::textKeys() const
Returns the text keys for this image. You can use these keys with text() to list the image text for a certain key.
Support for this option is implemented through QImageIOHandler::Description.
This function was introduced in Qt 4.1.
See also text(), QImageWriter::setText(), and QImage::textKeys().
Upstream PySide2 reference signatures (binding differences may apply):
textKeys(self) -> typing.List[str]
Source: https://doc.qt.io/archives/qt-5.15/qimagereader.html#textKeys