Skip to content

PythonQt.QtGui.QImage · declarations 001

Back to PythonQt.QtGui.QImage

Format_A2BGR30_Premultiplied instance-attribute

Format_A2BGR30_Premultiplied: Any

Format_A2RGB30_Premultiplied instance-attribute

Format_A2RGB30_Premultiplied: Any

Format_ARGB32 instance-attribute

Format_ARGB32: Any

Format_ARGB32_Premultiplied instance-attribute

Format_ARGB32_Premultiplied: Any

Format_ARGB4444_Premultiplied instance-attribute

Format_ARGB4444_Premultiplied: Any

Format_ARGB6666_Premultiplied instance-attribute

Format_ARGB6666_Premultiplied: Any

Format_ARGB8555_Premultiplied instance-attribute

Format_ARGB8555_Premultiplied: Any

Format_ARGB8565_Premultiplied instance-attribute

Format_ARGB8565_Premultiplied: Any

Format_Alpha8 instance-attribute

Format_Alpha8: Any

Format_BGR30 instance-attribute

Format_BGR30: Any

Format_Grayscale8 instance-attribute

Format_Grayscale8: Any

Format_Indexed8 instance-attribute

Format_Indexed8: Any

Format_Invalid instance-attribute

Format_Invalid: Any

Format_Mono instance-attribute

Format_Mono: Any

Format_MonoLSB instance-attribute

Format_MonoLSB: Any

Format_RGB16 instance-attribute

Format_RGB16: Any

Format_RGB30 instance-attribute

Format_RGB30: Any

Format_RGB32 instance-attribute

Format_RGB32: Any

Format_RGB444 instance-attribute

Format_RGB444: Any

Format_RGB555 instance-attribute

Format_RGB555: Any

Format_RGB666 instance-attribute

Format_RGB666: Any

Format_RGB888 instance-attribute

Format_RGB888: Any

Format_RGBA8888 instance-attribute

Format_RGBA8888: Any

Format_RGBA8888_Premultiplied instance-attribute

Format_RGBA8888_Premultiplied: Any

Format_RGBX8888 instance-attribute

Format_RGBX8888: Any

InvertMode instance-attribute

InvertMode: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

InvertRgb instance-attribute

InvertRgb: Any

InvertRgba instance-attribute

InvertRgba: Any

NImageFormats instance-attribute

NImageFormats: Any

allGray

allGray() -> bool

X.allGray() -> bool

Supplemental documentation: Qt 5 reference:

bool QImage::allGray() const

Returns true if all the colors in the image are shades of gray (i.e. their red, green and blue components are equal); otherwise false.

Note that this function is slow for images without color table.

See also isGrayscale().

Upstream PySide2 reference signatures (binding differences may apply):

allGray(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#allGray

alphaChannel

alphaChannel() -> Any

X.alphaChannel() -> PythonQt.QtGui.QImage

Upstream PySide2 reference signatures (binding differences may apply):

alphaChannel(self) -> PySide2.QtGui.QImage

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#alphaChannel

bitPlaneCount

bitPlaneCount() -> int

X.bitPlaneCount() -> int

Supplemental documentation: Qt 5 reference:

int QImage::bitPlaneCount() const

Returns the number of bit planes in the image.

The number of bit planes is the number of bits of color and transparency information for each pixel. This is different from (i.e. smaller than) the depth when the image format contains unused bits.

This function was introduced in Qt 4.7.

See also depth(), format(), and Image Formats.

Upstream PySide2 reference signatures (binding differences may apply):

bitPlaneCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#bitPlaneCount

bits

bits() -> str

X.bits()

Supplemental documentation: Qt 5 reference:

uchar *QImage::bits()

Returns a pointer to the first pixel data. This is equivalent to scanLine(0).

Note that QImage uses implicit data sharing. This function performs a deep copy of the shared pixel data, thus ensuring that this QImage is the only one using the current return value.

See also scanLine(), sizeInBytes(), and constBits().

const uchar *QImage::bits() const

This is an overloaded function.

Note that QImage uses implicit data sharing, but this function does not perform a deep copy of the shared pixel data, because the returned data is const.

Upstream PySide2 reference signatures (binding differences may apply):

bits(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#bits

byteCount

byteCount() -> int

X.byteCount() -> int

Upstream PySide2 reference signatures (binding differences may apply):

byteCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#byteCount

bytesPerLine

bytesPerLine() -> int

X.bytesPerLine() -> int

Supplemental documentation: Qt 5 reference:

int QImage::bytesPerLine() const

Returns the number of bytes per image scanline.

This is equivalent to sizeInBytes() / height() if height() is non-zero.

See also scanLine().

Upstream PySide2 reference signatures (binding differences may apply):

bytesPerLine(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#bytesPerLine

cacheKey

cacheKey() -> int

X.cacheKey() -> int

Supplemental documentation: Qt 5 reference:

qint64 QImage::cacheKey() const

Returns a number that identifies the contents of this QImage object. Distinct QImage objects can only have the same key if they refer to the same contents.

The key will change when the image is altered.

Upstream PySide2 reference signatures (binding differences may apply):

cacheKey(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#cacheKey

color

color(i: int) -> int

X.color(i) -> int

Supplemental documentation: Qt 5 reference:

QRgb QImage::color(int i) const

Returns the color in the color table at index i. The first color is at index 0.

The colors in an image's color table are specified as ARGB quadruplets (QRgb). Use the qAlpha(), qRed(), qGreen(), and qBlue() functions to get the color value components.

See also setColor(), pixelIndex(), and Pixel Manipulation.

Upstream PySide2 reference signatures (binding differences may apply):

color(self, i: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#color

colorCount

colorCount() -> int

X.colorCount() -> int

Supplemental documentation: Qt 5 reference:

int QImage::colorCount() const

Returns the size of the color table for the image.

Notice that colorCount() returns 0 for 32-bpp images because these images do not use color tables, but instead encode pixel values as ARGB quadruplets.

This function was introduced in Qt 4.6.

See also setColorCount() and Image Information.

Upstream PySide2 reference signatures (binding differences may apply):

colorCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#colorCount

colorTable

colorTable() -> tuple

X.colorTable() -> tuple

Supplemental documentation: Qt 5 reference:

QVector\<QRgb> QImage::colorTable() const

Returns a list of the colors contained in the image's color table, or an empty list if the image does not have a color table

See also setColorTable(), colorCount(), and color().

Upstream PySide2 reference signatures (binding differences may apply):

colorTable(self) -> typing.List[int]

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#colorTable

constBits

constBits() -> str

X.constBits()

Supplemental documentation: Qt 5 reference:

const uchar *QImage::constBits() const

Returns a pointer to the first pixel data.

Note that QImage uses implicit data sharing, but this function does not perform a deep copy of the shared pixel data, because the returned data is const.

This function was introduced in Qt 4.7.

See also bits() and constScanLine().

Upstream PySide2 reference signatures (binding differences may apply):

constBits(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qimage.html#constBits