Show / Hide Table of Contents

    Class ImageUtil

    Provides utilities for images.

    Inheritance
    Object
    ImageUtil
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Tizen.Multimedia.Util
    Assembly: Tizen.Multimedia.Util.dll
    Syntax
    public static class ImageUtil

    Methods

    CalculateBufferSize(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.

    API Version
    4
    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    width of resolution is less than or equal to zero.
    -or-
    height of resolution is less than or equal to zero.

    ArgumentException

    colorSpace is invalid.

    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.

    API Version
    4
    Exceptions
    Type Condition
    ArgumentNullException

    buffer is null.

    ArgumentException

    buffer is empty.

    ArgumentOutOfRangeException

    width of size is less than or equal to zero.
    -or-
    height of size is less than or equal to zero.

    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
    IEnumerable<ColorSpace>

    An IEnumerable of ColorSpace representing the supported color-spaces.

    API Version
    4
    Exceptions
    Type Condition
    ArgumentException

    format is invalid.

    Back to top Copyright © 2016-2018 Samsung
    Generated by DocFX