ByteImageProvider#

class omni.ui.ByteImageProvider#

Bases: ImageProvider

doc

Methods

__init__(*args, **kwargs)

Overloaded function.

set_bytes_data(self, bytes, sizes, format, ...)

Sets Python sequence as byte data.

set_bytes_data_from_gpu(self, gpu_bytes, ...)

Sets byte data from a copy of gpu memory at gpuBytes.

set_data(self, bytes, sizes[, strict])

[DEPRECATED FUNCTION]

set_data_array(self, bytes, sizes[, strict])

set_raw_bytes_data(self, raw_bytes, sizes, ...)

Sets byte data that the image provider will turn raw pointer array into an image.

Attributes

__init__(*args, **kwargs)#

Overloaded function.

  1. __init__(self: omni.ui._ui.ByteImageProvider) -> None

doc

  1. __init__(self: omni.ui._ui.ByteImageProvider, bytes: sequence, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = <TextureFormat.???: 0>, stride: int = -1, strict: bool = False) -> None

doc

set_bytes_data(self: omni.ui._ui.ByteImageProvider, bytes: sequence, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = <TextureFormat.???: 0>, stride: int = -1, strict: bool = False) → None#

Sets Python sequence as byte data. The image provider will recognize flattened color values, or sequence within sequence and convert it into an image. Pass strict=True to raise ValueError on malformed input instead of logging an error and silently skipping the upload.

set_bytes_data_from_gpu(self: omni.ui._ui.ByteImageProvider, gpu_bytes: int, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = <TextureFormat.RGBA8_UNORM: 11>, stride: int = -1, strict: bool = False) → None#

Sets byte data from a copy of gpu memory at gpuBytes.

set_data(
self: omni.ui._ui.ByteImageProvider,
bytes: List[int],
sizes: List[int],
strict: bool = False,
) → None#

[DEPRECATED FUNCTION]

set_data_array(
self: omni.ui._ui.ByteImageProvider,
bytes: numpy.ndarray[numpy.uint8],
sizes: List[int],
strict: bool = False,
) → None#
set_raw_bytes_data(self: omni.ui._ui.ByteImageProvider, raw_bytes: capsule, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = <TextureFormat.RGBA8_UNORM: 11>, stride: int = -1, strict: bool = False) → None#

Sets byte data that the image provider will turn raw pointer array into an image.