Image is a wrapper for an Image object. More...
Inherits IDisposable.
Public Member Functions | |
| Image (IntPtr handle, bool owner) | |
| Internal constructor of the Image. | |
| Image | Clone () |
| Creates a copy of this object and returns a Wrapper of it. | |
| bool | CopyFromBuffer (byte[] buffer, int width, int height) |
| Copies the given byte array into the VisionLib image. | |
| bool | CopyFromBuffer (IntPtr buffer, int width, int height) |
| bool | CopyToBuffer (byte[] buffer) |
| Copies the VisionLib image into the given byte array. | |
| void | CopyToTexture (ref Texture2D texture) |
| Copies the VisionLib image into the given Unity texture. | |
| void | Dispose () |
| Explicitly releases references to unmanaged resources. | |
| int | GetBytesPerPixel () |
| Returns the number of bytes per pixel. | |
| VLSDK.ImageFormat | GetFormat () |
| Returns an enumeration with the internal type of the image. | |
| IntPtr | getHandle () |
| int | GetHeight () |
| Returns the height of the image. | |
| int | GetWidth () |
| Returns the width of the image. | |
Static Public Member Functions | |
| static Image | CreateFromBuffer (byte[] buffer, int width, int height) |
| static Image | CreateFromBuffer (IntPtr buffer, int width, int height) |
| static Image | CreateFromTexture (Texture2D texture) |
| static Image | CreateFromTexture (Texture2D texture, ref byte[] byteBuffer) |
| static Image | CreateFromTexture (WebCamTexture texture) |
| static Image | CreateFromTexture (WebCamTexture texture, ref byte[] byteBuffer) |
Image is a wrapper for an Image object.
|
inline |
Internal constructor of the Image.
This constructor is used internally by the VisionLib.
| handle | Handle to the native object. |
| owner | true, if the Image is the owner of the native object; false, otherwise. |
|
inline |
Creates a copy of this object and returns a Wrapper of it.
|
inline |
Copies the given byte array into the VisionLib image.
The VisionLib image will be resized according to the width and height parameter.
Make sure, that the data stored in the byte array has the same format as the image. The image format can be acquired using the GetFormat function.
true, if the data was copied into the image successfully; false otherwise. | buffer | Byte array with the image data. |
| width | New width of the image. |
| height | New height of the image. |
|
inline |
Copies the VisionLib image into the given byte array.
Make sure, that the byte array is large enough for storing the whole image date (width * height * bytesPerPixel). The number of bytes per pixel an be acquired using the GetBytesPerPixel function.
true, if the data was copied to the byte array successfully; false otherwise. | buffer | Byte array for storing the raw image data. |
|
inline |
Copies the VisionLib image into the given Unity texture.
| texture | Reference to the texture to copy the image to. |
|
inline |
Explicitly releases references to unmanaged resources.
Call Dispose when you are finished using the Image. The Dispose method leaves the Image in an unusable state. After calling Dispose, you must release all references to the Image so the garbage collector can reclaim the memory that the Image was occupying.
|
inline |
Returns the number of bytes per pixel.
|
inline |
Returns an enumeration with the internal type of the image.
|
inline |
Returns the height of the image.
|
inline |
Returns the width of the image.