Representation of an image, typically returned by the CameraDevice. More...
Public Member Functions | |
Image (ImageDescription description) | |
Image (ImageDescription description, byte[] data) | |
Image (PIXEL_FORMAT format) | |
Image () | |
Create empty image More... | |
void | CopyBufferToTexture (Texture2D texture) |
The whole buffer (i.e. BufferWidth x BufferHeight) is copied to the texture. Width, height and format of texture will be updated to fit the input image. More... | |
void | CopyToTexture (Texture2D texture2D) |
Copies the image into the given texture. Width and height of texture will be updated to fit the input image. The image data is converted to the format of the texture. Only grayscale, RGB24 and RGBA32 are supported. Only the image portion defined by Width and Height is copied to the texture, not the whole buffer. More... | |
void | CopyToTexture (Texture2D texture2D, bool flipY) |
Copies the image into the given texture. Width and height of texture will be updated to fit the input image. The image data is converted to the format of the texture. Only grayscale, RGB24 and RGBA32 are supported. Only the image portion defined by Width and Height is copied to the texture, not the whole buffer. More... | |
void | Resize (ImageDescription description) |
Resizing an image deletes any existing image data More... | |
Static Public Member Functions | |
static bool | IsNullOrEmpty (Image image) |
Properties | |
int | BufferHeight [get] |
The height (number of rows) of the underlying pixel buffer. More... | |
int | BufferWidth [get] |
The width (number of columns) of the underlying pixel buffer. More... | |
ImageDescription | Description [get] |
int | Height [get] |
The height of the image in pixels. Note that the pixel buffer can be higher than this. More... | |
PIXEL_FORMAT | PixelFormat [get] |
The pixel format of the image More... | |
byte[] | Pixels [get] |
Get pixel data of the image More... | |
int | Stride [get] |
The number of bytes between the start of a pixel row and the start of the next More... | |
int | Width [get] |
The width of the image in pixels. Note that the pixel buffer can be wider than this. More... | |
Representation of an image, typically returned by the CameraDevice.
The image's pixel buffer may have a different size than expected based on the values of Width and Height.
Image | ( | ImageDescription | description | ) |
Image | ( | ImageDescription | description, |
byte[] | data | ||
) |
Image | ( | PIXEL_FORMAT | format | ) |
Image | ( | ) |
Create empty image
void CopyBufferToTexture | ( | Texture2D | texture | ) |
The whole buffer (i.e. BufferWidth x BufferHeight) is copied to the texture. Width, height and format of texture will be updated to fit the input image.
void CopyToTexture | ( | Texture2D | texture2D | ) |
Copies the image into the given texture. Width and height of texture will be updated to fit the input image. The image data is converted to the format of the texture. Only grayscale, RGB24 and RGBA32 are supported. Only the image portion defined by Width and Height is copied to the texture, not the whole buffer.
void CopyToTexture | ( | Texture2D | texture2D, |
bool | flipY | ||
) |
Copies the image into the given texture. Width and height of texture will be updated to fit the input image. The image data is converted to the format of the texture. Only grayscale, RGB24 and RGBA32 are supported. Only the image portion defined by Width and Height is copied to the texture, not the whole buffer.
texture2D | output texture |
flipY | whether the image should be flipped in y-direction |
|
static |
void Resize | ( | ImageDescription | description | ) |
Resizing an image deletes any existing image data
|
get |
The height (number of rows) of the underlying pixel buffer.
|
get |
The width (number of columns) of the underlying pixel buffer.
|
get |
|
get |
The height of the image in pixels. Note that the pixel buffer can be higher than this.
|
get |
The pixel format of the image
|
get |
Get pixel data of the image
|
get |
The number of bytes between the start of a pixel row and the start of the next
|
get |
The width of the image in pixels. Note that the pixel buffer can be wider than this.