Class PixelData
Definition
- Assembly:
- Tizen.NUI.dll
The PixelData object holds a pixel buffer.
The PixelData takes over the ownership of the pixel buffer.
The buffer memory must not be released outside of this class, instead,
the PixelData object will release it automatically when the reference count falls to zero.
public class PixelData : BaseHandle, IDynamicResourceHandler, INameScope, System.IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
View SourcePixelData(byte[], uint, uint, uint, PixelFormat, ReleaseFunction)
Creates a PixelData object.
Declaration
public PixelData(byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat, PixelData.ReleaseFunction releaseFunction)
Parameters
Type | Name | Description |
---|---|---|
byte[] | buffer | The raw pixel data. |
uint | bufferSize | The size of the buffer in bytes. |
uint | width | Buffer width in pixels. |
uint | height | Buffer height in pixels. |
PixelFormat | pixelFormat | The pixel format. |
PixelData.ReleaseFunction | releaseFunction | The function used to release the memory. |
PixelData(byte[], uint, uint, uint, PixelFormat)
Creates a PixelData object.
Declaration
public PixelData(byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
byte[] | buffer | The raw pixel data. |
uint | bufferSize | The size of the buffer in bytes. |
uint | width | Buffer width in pixels. |
uint | height | Buffer height in pixels. |
PixelFormat | pixelFormat | The pixel format. |
Methods
View SourceGenerateUrl()
Generate Url from pixel data.
Declaration
public ImageUrl GenerateUrl()
Returns
Type | Description |
---|---|
ImageUrl |
Remarks
This API should not be called at worker thread.
GetHeight()
Gets the height of the buffer in pixels.
Declaration
public uint GetHeight()
Returns
Type | Description |
---|---|
uint | The height of the buffer in pixels. |
GetPixelFormat()
Gets the pixel format.
Declaration
public PixelFormat GetPixelFormat()
Returns
Type | Description |
---|---|
PixelFormat | The pixel format. |
GetWidth()
Gets the width of the buffer in pixels.
Declaration
public uint GetWidth()
Returns
Type | Description |
---|---|
uint | The width of the buffer in pixels. |
ReleaseSwigCPtr(HandleRef)
Declaration
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type | Name | Description |
---|---|---|
Tizen.System.Runtime.InteropServices.HandleRef | swigCPtr |