YUVAPixmaps
- class YUVAPixmaps
Helper to store
Pixmapplanes as described by aYUVAPixmapInfo. Can be responsible for allocating/freeing memory for pixmaps or use external memory.Methods
Allocate space for pixmaps' pixels in the
YUVAPixmaps.Use storage in
Dataas backing store for pixmaps' pixels.Use passed in memory as backing store for pixmaps' pixels.
Wraps existing
Pixmap.Does have initialized pixmaps compatible with its
YUVAInfo.Number of pixmap planes or 0 if this
YUVAPixmapsis invalid.Get the ith
Pixmapplane.Access the
Pixmapplanes.
Methods
- static YUVAPixmaps.Allocate(yuvaPixmapInfo: skia.YUVAPixmapInfo) skia.YUVAPixmaps
Allocate space for pixmaps’ pixels in the
YUVAPixmaps.
- static YUVAPixmaps.FromData(yuvaPixmapInfo: skia.YUVAPixmapInfo, data: skia.Data) skia.YUVAPixmaps
Use storage in
Dataas backing store for pixmaps’ pixels.Datais retained by theYUVAPixmaps.
- static YUVAPixmaps.FromExternalMemory(yuvaPixmapInfo: skia.YUVAPixmapInfo, memory: typing_extensions.Buffer) skia.YUVAPixmaps
Use passed in memory as backing store for pixmaps’ pixels. Caller must ensure memory remains allocated while pixmaps are in use. There must be at least
YUVAPixmapInfo.computeTotalBytes()allocated starting at memory.
- static YUVAPixmaps.FromExternalPixmaps(yuvaInfo: skia.YUVAInfo, pixmaps: collections.abc.Sequence[skia.Pixmap]) skia.YUVAPixmaps
Wraps existing
Pixmap. TheYUVAPixmapswill have no ownership of thePixmap’ pixel memory so the caller must ensure it remains valid. Will return an invalidYUVAPixmapsif theYUVAInfoisn’t compatible with thePixmaparray (number of planes, plane dimensions, sufficient color channels in planes, …).
- YUVAPixmaps.__init__(self: skia.YUVAPixmaps) None
- YUVAPixmaps.isValid(self: skia.YUVAPixmaps) bool
Does have initialized pixmaps compatible with its
YUVAInfo.
- YUVAPixmaps.numPlanes(self: skia.YUVAPixmaps) int
Number of pixmap planes or 0 if this
YUVAPixmapsis invalid.
- YUVAPixmaps.plane(self: skia.YUVAPixmaps, i: SupportsInt | SupportsIndex) skia.Pixmap
Get the ith
Pixmapplane.Pixmapwill be default initialized if i >= numPlanes or thisYUVAPixmapsis invalid.
- YUVAPixmaps.planes(self: skia.YUVAPixmaps) Annotated[list[skia.Pixmap], 'FixedSize(4)']
Access the
Pixmapplanes. They are default initialized if this is not a validYUVAPixmaps.
- YUVAPixmaps.yuvaInfo(self: skia.YUVAPixmaps) skia.YUVAInfo