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

2026-08-25 浏览 (1)

OH_ImageSourceNative

struct OH_ImageSourceNative

Overview

The struct describes the image source, which is encapsulated at the native layer and is used to create image data. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.

You can create an OH_ImageSourceNative object in multiple ways, as described below.

APIDescription
OH_ImageSourceNative_CreateFromUriCreates an OH_ImageSourceNative object based on a URI.
OH_ImageSourceNative_CreateFromFdCreates an OH_ImageSourceNative object based on a file descriptor.
OH_ImageSourceNative_CreateFromDataCreates an OH_ImageSourceNative object based on buffer data.
OH_ImageSourceNative_CreateFromRawFileCreates an OH_ImageSourceNative object by using the raw file descriptor of an image resource file.
OH_ImageSourceNative_CreatePixelmapCreates an OH_PixelmapNative object based on decoding options.
OH_ImageSourceNative_CreatePixelmapListCreates an array of OH_PixelmapNative objects based on decoding options.

To release an OH_ImageSourceNative object, call OH_ImageSourceNative_Release.

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

Field TypeField NameField DescriptionOperation FunctionFunction Description
int32_tdelayTimeListImage delay time list.OH_ImageSourceNative_GetDelayTimeListObtains the image delay time list.
OH_ImageSource_InfoinfoImage source information.OH_ImageSourceNative_GetImageInfoObtains the information about an image with a given index.
Image_StringvalueConfiguration item.OH_ImageSourceNative_GetImagePropertyObtains the value of an image property.
Image_StringvalueConfiguration item.OH_ImageSourceNative_ModifyImagePropertyModifies the value of an image property.
uint32_tframeCountNumber of frames.OH_ImageSourceNative_GetFrameCountObtains the number of image frames.

Since: 12

Related module: Image_NativeModule

Header file: 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/hbX2NZmf