OH_DecodingOptions

typedef struct OH_DecodingOptions OH_DecodingOptions

Overview

The OH_DecodingOptions struct describes the decoding options encapsulated at the native layer. The struct is used to set decoding options and is passed in as an input parameter for creating a PixelMap. For details, see OH_ImageSourceNative_CreatePixelmap.

The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.

To create an OH_DecodingOptions object, call OH_DecodingOptions_Create.

To release an OH_DecodingOptions object, call OH_DecodingOptions_Release.

The table below describes the content and operation mode of the OH_DecodingOptions struct.

Field Type Field Name Field Description Default Value Getter Function Setter Function
int32_t pixelFormat Pixel format. RGBA_8888 OH_DecodingOptions_GetPixelFormat OH_DecodingOptions_SetPixelFormat
uint32_t index Index of the image to decode. 0 OH_DecodingOptions_GetIndex OH_DecodingOptions_SetIndex
float rotate Rotation angle. 0, in degree (deg) OH_DecodingOptions_GetRotate OH_DecodingOptions_SetRotate
Image_Size desiredSize Desired output size. Original image size OH_DecodingOptions_GetDesiredSize OH_DecodingOptions_SetDesiredSize
Image_Region desiredRegion Region to decode. Entire image OH_DecodingOptions_GetDesiredRegion OH_DecodingOptions_SetDesiredRegion
int32_t desiredDynamicRange Desired dynamic range. SDR OH_DecodingOptions_GetDesiredDynamicRange OH_DecodingOptions_SetDesiredDynamicRange

Since: 12

Related module: Image_NativeModule

Header file: image_source_native.h