Class ImageUtil
Definition
- Namespace:
- Tizen.Multimedia.Util
- Assembly:
- Tizen.Multimedia.Util.dll
- API Level:
- 4
Provides utilities for images.
public static class ImageUtil
- Inheritance
-
ImageUtil
Methods
View SourceCalculateBufferSize(Size, ColorSpace)
Calculates the size of the image buffer for the specified resolution and color-space.
Declaration
[Obsolete("Please do not use! This will be deprecated in level 6.")]
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 |
---|---|
Int32 | The buffer size. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | width of |
ArgumentException |
|
API Level: 4
View SourceGetColor(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 |
---|---|
ArgumentNullException |
|
ArgumentException |
|
ArgumentOutOfRangeException | width of |
API Level: 4
View SourceGetSupportedColorSpaces(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 |
---|---|
IEnumerable<ColorSpace> | An IEnumerable of ColorSpace representing the supported color-spaces. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|