Class ImageUtil
Definition
- Namespace:
- Tizen.Multimedia.Util
- Assembly:
- Tizen.Multimedia.Util.dll
Provides utilities for images.
public static class ImageUtil
- Inheritance
-
objectImage
Util
Methods
View SourceCalculateBufferSize(Size, ColorSpace)
Calculates the size of the image buffer for the specified resolution and color-space.
Declaration
public static int CalculateBufferSize(Size resolution, ColorSpace colorSpace)
Parameters
Type | Name | Description |
---|---|---|
Size | resolution | The resolution of the image. |
Color |
colorSpace | Color |
Returns
Type | Description |
---|---|
int | The buffer size. |
Exceptions
Type | Condition |
---|---|
System. |
width of |
System. |
|
GetColor(byte[], Size)
Extracts representative color from an image buffer.
Declaration
public static Color GetColor(byte[] buffer, Size size)
Parameters
Type | Name | Description |
---|---|---|
byte[] | buffer | Raw image buffer. |
Size | size | Resolution of the image. |
Returns
Type | Description |
---|---|
Color | The representative color of the image. |
Remarks
The image should be Rgb888.
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|
System. |
width of |
GetSupportedColorSpaces(ImageFormat)
Retrieves supported colorspaces for a Image
Declaration
public static IEnumerable<ColorSpace> GetSupportedColorSpaces(ImageFormat format)
Parameters
Type | Name | Description |
---|---|---|
Image |
format | The Image |
Returns
Type | Description |
---|---|
System. |
An IEnumerable of Color |
Exceptions
Type | Condition |
---|---|
System. |
|