PythonQt.QtGui.QPixelFormat
QPixelFormat
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
In Qt there is a often a need to represent the layout of the pixels in a graphics buffer. Internally QPixelFormat stores everything in a 64 bit datastructure. This gives performance but also some limitations.
QPixelFormat can describe 5 color channels and 1 alpha channel, each can use 6 bits to describe the size of the color channel.
The position of the alpha channel is described with a separate enum. This is to make it possible to describe QImage formats like ARGB32, and also describe typical OpenGL formats like RBGA8888.
How pixels are suppose to be read is determined by the TypeInterpretation enum. It describes if color values are suppose to be read byte per byte, or if a pixel is suppose to be read as a complete int and then masked.
There is no support for describing YUV's macro pixels. Instead a list of YUV formats has been made. When a QPixelFormat is describing a YUV format, the bitsPerPixel value has been deduced by the YUV Layout enum. Also, the color channels should all be set to zero except the fifth color channel that should store the bitsPerPixel value.
Source: https://doc.qt.io/archives/qt-5.15/qpixelformat.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
Alpha |
attribute | Any |
(shared captured text) |
AlphaPosition |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
AlphaPremultiplied |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
AlphaUsage |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
AtBeginning |
attribute | Any |
|
AtEnd |
attribute | Any |
|
BGR |
attribute | Any |
(shared captured text) |
BigEndian |
attribute | Any |
(shared captured text) |
ByteOrder |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
CMYK |
attribute | Any |
|
ColorModel |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
CurrentSystemEndian |
attribute | Any |
|
FloatingPoint |
attribute | Any |
|
Grayscale |
attribute | Any |
|
HSL |
attribute | Any |
|
HSV |
attribute | Any |
|
IMC1 |
attribute | Any |
|
IMC2 |
attribute | Any |
|
IMC3 |
attribute | Any |
|
IMC4 |
attribute | Any |
|
IgnoresAlpha |
attribute | Any |
|
Indexed |
attribute | Any |
|
LittleEndian |
attribute | Any |
(shared captured text) |
NV12 |
attribute | Any |
|
NV21 |
attribute | Any |
|
NotPremultiplied |
attribute | Any |
|
Premultiplied |
attribute | Any |
|
RGB |
attribute | Any |
(shared captured text) |
TypeInterpretation |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
UYVY |
attribute | Any |
|
UnsignedByte |
attribute | Any |
|
UnsignedInteger |
attribute | Any |
|
UnsignedShort |
attribute | Any |
|
UsesAlpha |
attribute | Any |
|
Y16 |
attribute | Any |
|
Y8 |
attribute | Any |
|
YUV |
attribute | Any |
|
YUV411 |
attribute | Any |
|
YUV420P |
attribute | Any |
|
YUV420SP |
attribute | Any |
|
YUV422 |
attribute | Any |
|
YUV444 |
attribute | Any |
|
YUVLayout |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
YUYV |
attribute | Any |
|
YV12 |
attribute | Any |
|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
alphaPosition |
function | (self) -> Any |
Accessor function for alphaPosition. |
alphaSize |
function | (self) -> int |
X.alphaSize() -> int |
alphaUsage |
function | (self) -> Any |
Accessor function for alphaUsage. |
bitsPerPixel |
function | (self) -> int |
X.bitsPerPixel() -> int |
blackSize |
function | (self) -> int |
X.blackSize() -> int |
blueSize |
function | (self) -> int |
X.blueSize() -> int |
brightnessSize |
function | (self) -> int |
X.brightnessSize() -> int |
byteOrder |
function | (self) -> Any |
The byte order is almost always set the byte order of the current system. |
channelCount |
function | (self) -> int |
X.channelCount() -> int |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
colorModel |
function | (self) -> Any |
Accessor function for getting the colorModel. |
cyanSize |
function | (self) -> int |
X.cyanSize() -> int |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
greenSize |
function | (self) -> int |
X.greenSize() -> int |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
hueSize |
function | (self) -> int |
X.hueSize() -> int |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
lightnessSize |
function | (self) -> int |
X.lightnessSize() -> int |
magentaSize |
function | (self) -> int |
X.magentaSize() -> int |
premultiplied |
function | (self) -> Any |
Accessor function for the [AlphaPremultiplied](https://doc.qt.io/archives/qt-5.15/qpixelformat.html#AlphaPremultiplied-enum) enum. |
redSize |
function | (self) -> int |
X.redSize() -> int |
saturationSize |
function | (self) -> int |
X.saturationSize() -> int |
subEnum |
function | (self) -> int |
X.subEnum() -> int |
typeInterpretation |
function | (self) -> Any |
Accessor function for the type representation of a color channel or a pixel. |
yellowSize |
function | (self) -> int |
X.yellowSize() -> int |
yuvLayout |
function | (self) -> Any |
Accessor function for the [YUVLayout](https://doc.qt.io/archives/qt-5.15/qpixelformat.html#YUVLayout-enum). |