openharmony 鸿蒙 capi-image-nativemodule-oh-decodingoptions

2026-08-25 浏览 (1)

OH_DecodingOptions

typedef struct OH_DecodingOptions OH_DecodingOptions

概述

OH_DecodingOptions是native层封装的解码选项参数结构体,用于设置解码选项参数,在创建Pixelmap时作为入参传入,详细信息见OH_ImageSourceNative_CreatePixelmap

OH_DecodingOptions结构体不可直接操作,而是采用函数调用方式创建、释放结构体以及操作具体字段。

创建OH_DecodingOptions对象使用OH_DecodingOptions_Create函数。

释放OH_DecodingOptions对象使用OH_DecodingOptions_Release函数。

OH_DecodingOptions结构体内容和操作方式如下:

字段类型字段名称字段描述字段默认值字段获取函数字段设置函数
int32_tpixelFormat像素格式RGBA_8888OH_DecodingOptions_GetPixelFormatOH_DecodingOptions_SetPixelFormat
uint32_tindex解码图片序号0OH_DecodingOptions_GetIndexOH_DecodingOptions_SetIndex
floatrotate旋转角度单位为deg, 默认值为0OH_DecodingOptions_GetRotateOH_DecodingOptions_SetRotate
Image_SizedesiredSize期望输出大小默认为原始图片尺寸OH_DecodingOptions_GetDesiredSizeOH_DecodingOptions_SetDesiredSize
Image_RegiondesiredRegion解码区域默认为完整图片大小的区域OH_DecodingOptions_GetDesiredRegionOH_DecodingOptions_SetDesiredRegion
int32_tdesiredDynamicRange期望动态范围SDROH_DecodingOptions_GetDesiredDynamicRangeOH_DecodingOptions_SetDesiredDynamicRange

起始版本: 12

相关模块: Image_NativeModule

所在头文件: image_source_native.h

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-image-nativemodule-oh-pixelmap-hdrmetadatavalue

openharmony 鸿蒙 capi-image-imagepacker-opts-

openharmony 鸿蒙 capi-image-nativemodule-image-region

openharmony 鸿蒙 capi-image-imagepacker-native-

openharmony 鸿蒙 capi-image-imagenative-

openharmony 鸿蒙 capi-image-processing-h

openharmony 鸿蒙 capi-image-ohosimagesourcesupportedformat

openharmony 鸿蒙 capi-image-nativemodule-image-size

openharmony 鸿蒙 capi-image-mdk-h

openharmony 鸿蒙 capi-image-ohosimagesourcedelaytimelist

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/yvm7lUm9