Class ImageUtil
Definition
- Namespace:
- Tizen.Multimedia.Util
- Assembly:
- Tizen.Multimedia.Util.dll
Provides utilities for images.
public static class ImageUtil
- Inheritance
-
objectImageUtil
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. |
ColorSpace | colorSpace | ColorSpace of the image. |
Returns
Type | Description |
---|---|
int | The buffer size. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | width of |
System.ArgumentException |
|
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.ArgumentNullException |
|
System.ArgumentException |
|
System.ArgumentOutOfRangeException | width of |
GetSupportedColorSpaces(ImageFormat)
Retrieves supported colorspaces for a ImageFormat that represents formats for ImageEncoder and ImageDecoder.
Declaration
public static IEnumerable<ColorSpace> GetSupportedColorSpaces(ImageFormat format)
Parameters
Type | Name | Description |
---|---|---|
ImageFormat | format | The ImageFormat. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><ColorSpace> | An IEnumerable of ColorSpace representing the supported color-spaces. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
|