Class ImageUtil

Definition

Namespace:
Tizen.Multimedia.Util
Assembly:
Tizen.Multimedia.Util.dll
API Level:
4

Provides utilities for images.

C#
Copy
public static class ImageUtil : object
Inheritance
ImageUtil

Methods

View Source

CalculateBufferSize(Size, ColorSpace)

Calculates the size of the image buffer for the specified resolution and color-space.

Declaration
C#
Copy
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.

API Level: 4
View Source

GetColor(Byte[], Size)

Extracts representative color from an image buffer.

Declaration
C#
Copy
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.

API Level: 4
View Source

GetSupportedColorSpaces(ImageFormat)

Retrieves supported colorspaces for a ImageFormat that represents formats for ImageEncoder and ImageDecoder.

Declaration
C#
Copy
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.

API Level: 4