• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OH_DecodingOptions
2<!--Kit: Image Kit-->
3<!--Subsystem: Multimedia-->
4<!--Owner: @aulight02-->
5<!--Designer: @liyang_bryan-->
6<!--Tester: @xchaosioda-->
7<!--Adviser: @zengyawen-->
8
9## 概述
10
11OH_DecodingOptions是native层封装的解码选项参数结构体,用于设置解码选项参数,在创建Pixelmap时作为入参传入,详细信息见[OH_ImageSourceNative_CreatePixelmap](capi-image-source-native-h.md#oh_imagesourcenative_createpixelmap)。
12
13OH_DecodingOptions结构体不可直接操作,而是采用函数调用方式创建、释放结构体以及操作具体字段。
14
15创建OH_DecodingOptions对象使用[OH_DecodingOptions_Create](capi-image-source-native-h.md#oh_decodingoptions_create)函数。
16
17释放OH_DecodingOptions对象使用[OH_DecodingOptions_Release](capi-image-source-native-h.md#oh_decodingoptions_release)函数。
18
19OH_DecodingOptions结构体内容和操作方式如下:
20
21| 字段类型| 字段名称 | 字段描述 |操作函数 | 函数描述 |
22| -------- | -------- | -------- | -------- | -------- |
23| int32_t | pixelFormat | 像素格式 | [OH_DecodingOptions_GetPixelFormat](capi-image-source-native-h.md#oh_decodingoptions_getpixelformat) |获取pixel格式。|
24| int32_t | pixelFormat | 像素格式 | [OH_DecodingOptions_SetPixelFormat](capi-image-source-native-h.md#oh_decodingoptions_setpixelformat) | 设置像素格式。|
25| uint32_t | index | 解码图片序号 | [OH_DecodingOptions_GetIndex](capi-image-source-native-h.md#oh_decodingoptions_getindex) | 获取解码图片序号。|
26| uint32_t | index | 解码图片序号 | [OH_DecodingOptions_SetIndex](capi-image-source-native-h.md#oh_decodingoptions_setindex) | 设置解码图片序号。|
27| float | rotate | 旋转角度 | [OH_DecodingOptions_GetRotate](capi-image-source-native-h.md#oh_decodingoptions_getrotate) | 获取旋转角度。|
28| float | rotate | 旋转角度 | [OH_DecodingOptions_SetRotate](capi-image-source-native-h.md#oh_decodingoptions_setrotate) | 设置旋转角度。|
29| Image_Size | desiredSize | 期望输出大小 | [OH_DecodingOptions_GetDesiredSize](capi-image-source-native-h.md#oh_decodingoptions_getdesiredsize) | 获取期望输出大小。|
30| Image_Size | desiredSize | 期望输出大小 | [OH_DecodingOptions_SetDesiredSize](capi-image-source-native-h.md#oh_decodingoptions_setdesiredsize) | 设置期望输出大小。|
31| Image_Region | desiredRegion | 解码区域 | [OH_DecodingOptions_GetDesiredRegion](capi-image-source-native-h.md#oh_decodingoptions_getdesiredregion) | 获取解码区域。|
32| Image_Region | desiredRegion | 解码区域 | [OH_DecodingOptions_SetDesiredRegion](capi-image-source-native-h.md#oh_decodingoptions_setdesiredregion) | 设置解码区域。|
33| int32_t | desiredDynamicRange | 期望动态范围 | [OH_DecodingOptions_GetDesiredDynamicRange](capi-image-source-native-h.md#oh_decodingoptions_getdesireddynamicrange) |获取解码时设置的期望动态范围。|
34| int32_t | desiredDynamicRange | 期望动态范围 | [OH_DecodingOptions_SetDesiredDynamicRange](capi-image-source-native-h.md#oh_decodingoptions_setdesireddynamicrange)|设置解码时的期望动态范围。|
35
36**起始版本:** 12
37
38**相关模块:** [Image_NativeModule](capi-image-nativemodule.md)
39
40**所在头文件:** [image_source_native.h](capi-image-source-native-h.md)
41
42