• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# picture_native.h
2<!--Kit: Image Kit-->
3<!--Subsystem: Multimedia-->
4<!--Owner: @aulight02-->
5<!--SE: @liyang_bryan-->
6<!--TSE: @xchaosioda-->
7
8## Overview
9
10The file declares the APIs for obtaining picture data and information.
11
12**Library**: libpicture.so
13
14**Since**: 13
15
16**Related module**: [Image_NativeModule](capi-image-nativemodule.md)
17
18## Summary
19
20### Structs
21
22| Name| typedef Keyword| Description|
23| -- | -- | -- |
24| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) | OH_PictureNative | Describes the picture, which is used to perform operations related to the picture.|
25| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) | OH_AuxiliaryPictureNative | Describes the auxiliary picture, which is used to perform operations related to the auxiliary picture.|
26| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) | OH_AuxiliaryPictureInfo | Describes the auxiliary picture information, which is used to perform operations related to the auxiliary picture information.|
27
28### Enums
29
30| Name| typedef Keyword| Description|
31| -- | -- | -- |
32| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) | Image_AuxiliaryPictureType | Type of the auxiliary picture.|
33
34### Functions
35
36| Name| Description|
37| -- | -- |
38| [Image_ErrorCode OH_PictureNative_CreatePicture(OH_PixelmapNative *mainPixelmap, OH_PictureNative **picture)](#oh_picturenative_createpicture) | Creates the pointer to an OH_PictureNative object.|
39| [Image_ErrorCode OH_PictureNative_GetMainPixelmap(OH_PictureNative *picture, OH_PixelmapNative **mainPixelmap)](#oh_picturenative_getmainpixelmap) | Obtains the pointer to the OH_PixelmapNative object of a main picture.|
40| [Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmap(OH_PictureNative *picture, OH_PixelmapNative **hdrPixelmap)](#oh_picturenative_gethdrcomposedpixelmap) | Obtains the pointer to the OH_PixelmapNative object of an HDR picture.|
41| [Image_ErrorCode OH_PictureNative_GetGainmapPixelmap(OH_PictureNative *picture, OH_PixelmapNative **gainmapPixelmap)](#oh_picturenative_getgainmappixelmap) | Obtains the pointer to the OH_PixelmapNative object of a gain map.|
42| [Image_ErrorCode OH_PictureNative_SetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type,OH_AuxiliaryPictureNative *auxiliaryPicture)](#oh_picturenative_setauxiliarypicture) | Sets an auxiliary picture.|
43| [Image_ErrorCode OH_PictureNative_GetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type,OH_AuxiliaryPictureNative **auxiliaryPicture)](#oh_picturenative_getauxiliarypicture) | Obtains an auxiliary picture by type.|
44| [Image_ErrorCode OH_PictureNative_GetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType,OH_PictureMetadata **metadata)](#oh_picturenative_getmetadata) | Obtains the metadata of a main picture.|
45| [Image_ErrorCode OH_PictureNative_SetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType,OH_PictureMetadata *metadata)](#oh_picturenative_setmetadata) | Sets the metadata for a main picture.|
46| [Image_ErrorCode OH_PictureNative_Release(OH_PictureNative *picture)](#oh_picturenative_release) | Releases the pointer to an OH_PictureNative object.|
47| [Image_ErrorCode OH_AuxiliaryPictureNative_Create(uint8_t *data, size_t dataLength, Image_Size *size,Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture)](#oh_auxiliarypicturenative_create) | Creates the pointer to an OH_AuxiliaryPictureNative object.|
48| [Image_ErrorCode OH_AuxiliaryPictureNative_WritePixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *source,size_t bufferSize)](#oh_auxiliarypicturenative_writepixels) | Reads pixels in the buffer and writes the result to an auxiliary picture.|
49| [Image_ErrorCode OH_AuxiliaryPictureNative_ReadPixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *destination,size_t *bufferSize)](#oh_auxiliarypicturenative_readpixels) | Reads pixels of an auxiliary picture and writes the result to the buffer.|
50| [Image_ErrorCode OH_AuxiliaryPictureNative_GetType(OH_AuxiliaryPictureNative *auxiliaryPicture,Image_AuxiliaryPictureType *type)](#oh_auxiliarypicturenative_gettype) | Obtains the type of an auxiliary picture.|
51| [Image_ErrorCode OH_AuxiliaryPictureNative_GetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture,OH_AuxiliaryPictureInfo **info)](#oh_auxiliarypicturenative_getinfo) | Obtains the information of an auxiliary picture.|
52| [Image_ErrorCode OH_AuxiliaryPictureNative_SetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture,OH_AuxiliaryPictureInfo *info)](#oh_auxiliarypicturenative_setinfo) | Sets the information for an auxiliary picture.|
53| [Image_ErrorCode OH_AuxiliaryPictureNative_GetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture,Image_MetadataType metadataType, OH_PictureMetadata **metadata)](#oh_auxiliarypicturenative_getmetadata) | Obtains the metadata of an auxiliary picture.|
54| [Image_ErrorCode OH_AuxiliaryPictureNative_SetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture,Image_MetadataType metadataType, OH_PictureMetadata *metadata)](#oh_auxiliarypicturenative_setmetadata) | Sets the metadata for an auxiliary picture.|
55| [Image_ErrorCode OH_AuxiliaryPictureNative_Release(OH_AuxiliaryPictureNative *picture)](#oh_auxiliarypicturenative_release) | Releases the pointer to an OH_AuxiliaryPictureNative object.|
56| [Image_ErrorCode OH_AuxiliaryPictureInfo_Create(OH_AuxiliaryPictureInfo **info)](#oh_auxiliarypictureinfo_create) | Creates an OH_AuxiliaryPictureInfo object.|
57| [Image_ErrorCode OH_AuxiliaryPictureInfo_GetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType *type)](#oh_auxiliarypictureinfo_gettype) | Obtains the auxiliary picture type from the auxiliary picture information.|
58| [Image_ErrorCode OH_AuxiliaryPictureInfo_SetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType type)](#oh_auxiliarypictureinfo_settype) | Sets the auxiliary picture type in the auxiliary picture information.|
59| [Image_ErrorCode OH_AuxiliaryPictureInfo_GetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)](#oh_auxiliarypictureinfo_getsize) | Obtains the size of an auxiliary picture.|
60| [Image_ErrorCode OH_AuxiliaryPictureInfo_SetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)](#oh_auxiliarypictureinfo_setsize) | Sets the size for an auxiliary picture.|
61| [Image_ErrorCode OH_AuxiliaryPictureInfo_GetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t *rowStride)](#oh_auxiliarypictureinfo_getrowstride) | Obtains the row stride of an auxiliary picture.|
62| [Image_ErrorCode OH_AuxiliaryPictureInfo_SetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t rowStride)](#oh_auxiliarypictureinfo_setrowstride) | Sets the row stride for an auxiliary picture.|
63| [Image_ErrorCode OH_AuxiliaryPictureInfo_GetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT *pixelFormat)](#oh_auxiliarypictureinfo_getpixelformat) | Obtains the pixel format of an auxiliary picture.|
64| [Image_ErrorCode OH_AuxiliaryPictureInfo_SetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT pixelFormat)](#oh_auxiliarypictureinfo_setpixelformat) | Sets the pixel format for an auxiliary picture.|
65| [Image_ErrorCode OH_AuxiliaryPictureInfo_Release(OH_AuxiliaryPictureInfo *info)](#oh_auxiliarypictureinfo_release) | Releases the pointer to an OH_AuxiliaryPictureInfo object.|
66
67## Enum Description
68
69### Image_AuxiliaryPictureType
70
71```
72enum Image_AuxiliaryPictureType
73```
74
75**Description**
76
77Enumerates the auxiliary picture types.
78
79**Since**: 13
80
81| Enum Item| Description|
82| -- | -- |
83| AUXILIARY_PICTURE_TYPE_GAINMAP = 1 | Gain map, a mechanism for transforming an SDR image into an HDR image capable of adjustable display adjustment. It is a set of combinations describing how to apply gain map metadata.|
84| AUXILIARY_PICTURE_TYPE_DEPTH_MAP = 2 | Depth map, which stores the depth data of an image. It captures the distance between each pixel and the camera to provide 3D scene structure. It is usually used for 3D modeling and scene comprehension.|
85| AUXILIARY_PICTURE_TYPE_UNREFOCUS_MAP = 3 | Defocused portrait original image, which provides a method to emphasize background blur in portrait photographing. It helps users select a focus region in post-processing, allowing for greater creative control.|
86| AUXILIARY_PICTURE_TYPE_LINEAR_MAP = 4 | Linear map, which is used to provide additional viewpoints or supplementary information. It is usually used to enhance visual effects and can contain linear representations of lighting, colors, or other visual elements in a scene.|
87| AUXILIARY_PICTURE_TYPE_FRAGMENT_MAP = 5 | Fragment map, which indicates regions obscured by watermarks in the original image. It is used to remove or correct the watermark interference, thereby enhancing the image completeness and visibility.|
88
89
90## Function Description
91
92### OH_PictureNative_CreatePicture()
93
94```
95Image_ErrorCode OH_PictureNative_CreatePicture(OH_PixelmapNative *mainPixelmap, OH_PictureNative **picture)
96```
97
98**Description**
99
100Creates the pointer to an OH_PictureNative object.
101
102**Since**: 13
103
104
105**Parameters**
106
107| Name| Description|
108| -- | -- |
109| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *mainPixelmap | Pointer to the OH_PixelmapNative object of the main picture.|
110| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) **picture | Double pointer to the OH_PictureNative object created.|
111
112**Returns**
113
114| Type| Description|
115| -- | -- |
116| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
117
118### OH_PictureNative_GetMainPixelmap()
119
120```
121Image_ErrorCode OH_PictureNative_GetMainPixelmap(OH_PictureNative *picture, OH_PixelmapNative **mainPixelmap)
122```
123
124**Description**
125
126Obtains the pointer to the OH_PixelmapNative object of a main picture.
127
128**Since**: 13
129
130
131**Parameters**
132
133| Name| Description|
134| -- | -- |
135| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
136| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) **mainPixelmap | Double pointer to the OH_PixelmapNative object obtained.|
137
138**Returns**
139
140| Type| Description|
141| -- | -- |
142| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
143
144### OH_PictureNative_GetHdrComposedPixelmap()
145
146```
147Image_ErrorCode OH_PictureNative_GetHdrComposedPixelmap(OH_PictureNative *picture, OH_PixelmapNative **hdrPixelmap)
148```
149
150**Description**
151
152Obtains the pointer to the OH_PixelmapNative object of an HDR picture.
153
154**Since**: 13
155
156
157**Parameters**
158
159| Name| Description|
160| -- | -- |
161| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
162| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) **hdrPixelmap | Double pointer to the OH_PixelmapNative object of the HDR picture.|
163
164**Returns**
165
166| Type| Description|
167| -- | -- |
168| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_UNSUPPORTED_OPERATION**: The operation is not supported. For example, the Picture object does not contain a gain map.|
169
170### OH_PictureNative_GetGainmapPixelmap()
171
172```
173Image_ErrorCode OH_PictureNative_GetGainmapPixelmap(OH_PictureNative *picture, OH_PixelmapNative **gainmapPixelmap)
174```
175
176**Description**
177
178Obtains the pointer to the OH_PixelmapNative object of a gain map.
179
180**Since**: 13
181
182
183**Parameters**
184
185| Name| Description|
186| -- | -- |
187| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
188| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) **gainmapPixelmap | Double pointer to the OH_PixelmapNative object of the gain map.|
189
190**Returns**
191
192| Type| Description|
193| -- | -- |
194| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
195
196### OH_PictureNative_SetAuxiliaryPicture()
197
198```
199Image_ErrorCode OH_PictureNative_SetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type,OH_AuxiliaryPictureNative *auxiliaryPicture)
200```
201
202**Description**
203
204Sets an auxiliary picture.
205
206**Since**: 13
207
208
209**Parameters**
210
211| Name| Description|
212| -- | -- |
213| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
214| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type | Type of the auxiliary picture.|
215| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
216
217**Returns**
218
219| Type| Description|
220| -- | -- |
221| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
222
223### OH_PictureNative_GetAuxiliaryPicture()
224
225```
226Image_ErrorCode OH_PictureNative_GetAuxiliaryPicture(OH_PictureNative *picture, Image_AuxiliaryPictureType type,OH_AuxiliaryPictureNative **auxiliaryPicture)
227```
228
229**Description**
230
231Obtains an auxiliary picture by type.
232
233**Since**: 13
234
235
236**Parameters**
237
238| Name| Description|
239| -- | -- |
240| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
241| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type | Type of the auxiliary picture.|
242| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) **auxiliaryPicture | Double pointer to the OH_AuxiliaryPictureNative object obtained.|
243
244**Returns**
245
246| Type| Description|
247| -- | -- |
248| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
249
250### OH_PictureNative_GetMetadata()
251
252```
253Image_ErrorCode OH_PictureNative_GetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType,OH_PictureMetadata **metadata)
254```
255
256**Description**
257
258Obtains the metadata of a main picture.
259
260**Since**: 13
261
262
263**Parameters**
264
265| Name| Description|
266| -- | -- |
267| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
268| [Image_MetadataType](capi-image-common-h.md#image_metadatatype) metadataType | Metadata type.|
269| [OH_PictureMetadata](capi-image-nativemodule-oh-picturemetadata.md) **metadata | Double pointer to the metadata.|
270
271**Returns**
272
273| Type| Description|
274| -- | -- |
275| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_UNSUPPORTED_METADATA**: unsupported metadata type.|
276
277### OH_PictureNative_SetMetadata()
278
279```
280Image_ErrorCode OH_PictureNative_SetMetadata(OH_PictureNative *picture, Image_MetadataType metadataType,OH_PictureMetadata *metadata)
281```
282
283**Description**
284
285Sets the metadata for a main picture.
286
287**Since**: 13
288
289
290**Parameters**
291
292| Name| Description|
293| -- | -- |
294| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
295| [Image_MetadataType](capi-image-common-h.md#image_metadatatype) metadataType | Metadata type.|
296| [OH_PictureMetadata](capi-image-nativemodule-oh-picturemetadata.md) *metadata | Pointer to the metadata.|
297
298**Returns**
299
300| Type| Description|
301| -- | -- |
302| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_UNSUPPORTED_METADATA**: unsupported metadata type.|
303
304### OH_PictureNative_Release()
305
306```
307Image_ErrorCode OH_PictureNative_Release(OH_PictureNative *picture)
308```
309
310**Description**
311
312Releases the pointer to an OH_PictureNative object.
313
314**Since**: 13
315
316
317**Parameters**
318
319| Name| Description|
320| -- | -- |
321| [OH_PictureNative](capi-image-nativemodule-oh-picturenative.md) *picture | Pointer to an OH_PictureNative object.|
322
323**Returns**
324
325| Type| Description|
326| -- | -- |
327| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
328
329### OH_AuxiliaryPictureNative_Create()
330
331```
332Image_ErrorCode OH_AuxiliaryPictureNative_Create(uint8_t *data, size_t dataLength, Image_Size *size,Image_AuxiliaryPictureType type, OH_AuxiliaryPictureNative **auxiliaryPicture)
333```
334
335**Description**
336
337Creates the pointer to an OH_AuxiliaryPictureNative object.
338
339**Since**: 13
340
341
342**Parameters**
343
344| Name| Description|
345| -- | -- |
346| uint8_t *data | Pointer to the image data.|
347| size_t dataLength | Length of the image data.|
348| [Image_Size](capi-image-nativemodule-image-size.md) *size | Pointer to the size of the auxiliary picture.|
349| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type | Type of the auxiliary picture.|
350| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) **auxiliaryPicture | Double pointer to the OH_AuxiliaryPictureNative object created.|
351
352**Returns**
353
354| Type| Description|
355| -- | -- |
356| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
357
358### OH_AuxiliaryPictureNative_WritePixels()
359
360```
361Image_ErrorCode OH_AuxiliaryPictureNative_WritePixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *source,size_t bufferSize)
362```
363
364**Description**
365
366Reads pixels in the buffer and writes the result to an auxiliary picture.
367
368**Since**: 13
369
370
371**Parameters**
372
373| Name| Description|
374| -- | -- |
375| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
376| uint8_t *source | Pixels to be written.|
377| size_t bufferSize | Buffer size.|
378
379**Returns**
380
381| Type| Description|
382| -- | -- |
383| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_ALLOC_FAILED**: memory allocation failure.<br> **IMAGE_COPY_FAILED**: memory copy failure.|
384
385### OH_AuxiliaryPictureNative_ReadPixels()
386
387```
388Image_ErrorCode OH_AuxiliaryPictureNative_ReadPixels(OH_AuxiliaryPictureNative *auxiliaryPicture, uint8_t *destination,size_t *bufferSize)
389```
390
391**Description**
392
393Reads pixels of an auxiliary picture and writes the result to the buffer.
394
395**Since**: 13
396
397
398**Parameters**
399
400| Name| Description|
401| -- | -- |
402| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
403| uint8_t *destination | Pointer to the buffer to which the pixels of the auxiliary data will be written.|
404| size_t *bufferSize | Pointer to the buffer size.|
405
406**Returns**
407
408| Type| Description|
409| -- | -- |
410| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_ALLOC_FAILED**: memory allocation failure.<br> **IMAGE_COPY_FAILED**: memory copy failure.|
411
412### OH_AuxiliaryPictureNative_GetType()
413
414```
415Image_ErrorCode OH_AuxiliaryPictureNative_GetType(OH_AuxiliaryPictureNative *auxiliaryPicture,Image_AuxiliaryPictureType *type)
416```
417
418**Description**
419
420Obtains the type of an auxiliary picture.
421
422**Since**: 13
423
424
425**Parameters**
426
427| Name| Description|
428| -- | -- |
429| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
430| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) *type | Pointer to the auxiliary picture type.|
431
432**Returns**
433
434| Type| Description|
435| -- | -- |
436| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
437
438### OH_AuxiliaryPictureNative_GetInfo()
439
440```
441Image_ErrorCode OH_AuxiliaryPictureNative_GetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture,OH_AuxiliaryPictureInfo **info)
442```
443
444**Description**
445
446Obtains the information of an auxiliary picture.
447
448**Since**: 13
449
450
451**Parameters**
452
453| Name| Description|
454| -- | -- |
455| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
456| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) **info | Double pointer to the auxiliary picture information.|
457
458**Returns**
459
460| Type| Description|
461| -- | -- |
462| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
463
464### OH_AuxiliaryPictureNative_SetInfo()
465
466```
467Image_ErrorCode OH_AuxiliaryPictureNative_SetInfo(OH_AuxiliaryPictureNative *auxiliaryPicture,OH_AuxiliaryPictureInfo *info)
468```
469
470**Description**
471
472Sets the information for an auxiliary picture.
473
474**Since**: 13
475
476
477**Parameters**
478
479| Name| Description|
480| -- | -- |
481| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
482| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the auxiliary picture information.|
483
484**Returns**
485
486| Type| Description|
487| -- | -- |
488| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
489
490### OH_AuxiliaryPictureNative_GetMetadata()
491
492```
493Image_ErrorCode OH_AuxiliaryPictureNative_GetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture,Image_MetadataType metadataType, OH_PictureMetadata **metadata)
494```
495
496**Description**
497
498Obtains the metadata of an auxiliary picture.
499
500**Since**: 13
501
502
503**Parameters**
504
505| Name| Description|
506| -- | -- |
507| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
508| [Image_MetadataType](capi-image-common-h.md#image_metadatatype) metadataType | Metadata type.|
509| [OH_PictureMetadata](capi-image-nativemodule-oh-picturemetadata.md) **metadata | Double pointer to the metadata.|
510
511**Returns**
512
513| Type| Description|
514| -- | -- |
515| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_UNSUPPORTED_METADATA**: unsupported metadata type, or mismatch between the metadata type and the auxiliary picture type.|
516
517### OH_AuxiliaryPictureNative_SetMetadata()
518
519```
520Image_ErrorCode OH_AuxiliaryPictureNative_SetMetadata(OH_AuxiliaryPictureNative *auxiliaryPicture,Image_MetadataType metadataType, OH_PictureMetadata *metadata)
521```
522
523**Description**
524
525Sets the metadata for an auxiliary picture.
526
527**Since**: 13
528
529
530**Parameters**
531
532| Name| Description|
533| -- | -- |
534| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *auxiliaryPicture | Pointer to an OH_AuxiliaryPictureNative object.|
535| [Image_MetadataType](capi-image-common-h.md#image_metadatatype) metadataType | Metadata type.|
536| [OH_PictureMetadata](capi-image-nativemodule-oh-picturemetadata.md) *metadata | Pointer to the metadata.|
537
538**Returns**
539
540| Type| Description|
541| -- | -- |
542| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.<br> **IMAGE_UNSUPPORTED_METADATA**: unsupported metadata type, or mismatch between the metadata type and the auxiliary picture type.|
543
544### OH_AuxiliaryPictureNative_Release()
545
546```
547Image_ErrorCode OH_AuxiliaryPictureNative_Release(OH_AuxiliaryPictureNative *picture)
548```
549
550**Description**
551
552Releases the pointer to an OH_AuxiliaryPictureNative object.
553
554**Since**: 13
555
556
557**Parameters**
558
559| Name| Description|
560| -- | -- |
561| [OH_AuxiliaryPictureNative](capi-image-nativemodule-oh-auxiliarypicturenative.md) *picture | Pointer to an OH_AuxiliaryPictureNative object.|
562
563**Returns**
564
565| Type| Description|
566| -- | -- |
567| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
568
569### OH_AuxiliaryPictureInfo_Create()
570
571```
572Image_ErrorCode OH_AuxiliaryPictureInfo_Create(OH_AuxiliaryPictureInfo **info)
573```
574
575**Description**
576
577Creates an OH_AuxiliaryPictureInfo object.
578
579**Since**: 13
580
581
582**Parameters**
583
584| Name| Description|
585| -- | -- |
586| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) **info | Double pointer to the OH_AuxiliaryPictureInfo object created.|
587
588**Returns**
589
590| Type| Description|
591| -- | -- |
592| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
593
594### OH_AuxiliaryPictureInfo_GetType()
595
596```
597Image_ErrorCode OH_AuxiliaryPictureInfo_GetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType *type)
598```
599
600**Description**
601
602Obtains the auxiliary picture type from the auxiliary picture information.
603
604**Since**: 13
605
606
607**Parameters**
608
609| Name| Description|
610| -- | -- |
611| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
612| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) *type | Pointer to the type of the auxiliary picture.|
613
614**Returns**
615
616| Type| Description|
617| -- | -- |
618| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
619
620### OH_AuxiliaryPictureInfo_SetType()
621
622```
623Image_ErrorCode OH_AuxiliaryPictureInfo_SetType(OH_AuxiliaryPictureInfo *info, Image_AuxiliaryPictureType type)
624```
625
626**Description**
627
628Sets the auxiliary picture type in the auxiliary picture information.
629
630**Since**: 13
631
632
633**Parameters**
634
635| Name| Description|
636| -- | -- |
637| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
638| [Image_AuxiliaryPictureType](#image_auxiliarypicturetype) type | Type of the auxiliary picture.|
639
640**Returns**
641
642| Type| Description|
643| -- | -- |
644| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
645
646### OH_AuxiliaryPictureInfo_GetSize()
647
648```
649Image_ErrorCode OH_AuxiliaryPictureInfo_GetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)
650```
651
652**Description**
653
654Obtains the size of an auxiliary picture.
655
656**Since**: 13
657
658
659**Parameters**
660
661| Name| Description|
662| -- | -- |
663| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
664| [Image_Size](capi-image-nativemodule-image-size.md) *size | Pointer to the size.|
665
666**Returns**
667
668| Type| Description|
669| -- | -- |
670| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
671
672### OH_AuxiliaryPictureInfo_SetSize()
673
674```
675Image_ErrorCode OH_AuxiliaryPictureInfo_SetSize(OH_AuxiliaryPictureInfo *info, Image_Size *size)
676```
677
678**Description**
679
680Sets the size for an auxiliary picture.
681
682**Since**: 13
683
684
685**Parameters**
686
687| Name| Description|
688| -- | -- |
689| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
690| [Image_Size](capi-image-nativemodule-image-size.md) *size | Pointer to the size.|
691
692**Returns**
693
694| Type| Description|
695| -- | -- |
696| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
697
698### OH_AuxiliaryPictureInfo_GetRowStride()
699
700```
701Image_ErrorCode OH_AuxiliaryPictureInfo_GetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t *rowStride)
702```
703
704**Description**
705
706Obtains the row stride of an auxiliary picture.
707
708**Since**: 13
709
710
711**Parameters**
712
713| Name| Description|
714| -- | -- |
715| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
716| uint32_t *rowStride | Pointer to the row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels in memory.|
717
718**Returns**
719
720| Type| Description|
721| -- | -- |
722| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
723
724### OH_AuxiliaryPictureInfo_SetRowStride()
725
726```
727Image_ErrorCode OH_AuxiliaryPictureInfo_SetRowStride(OH_AuxiliaryPictureInfo *info, uint32_t rowStride)
728```
729
730**Description**
731
732Sets the row stride for an auxiliary picture.
733
734**Since**: 13
735
736
737**Parameters**
738
739| Name| Description|
740| -- | -- |
741| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
742| uint32_t rowStride | Row stride, which is the number of bytes from one row of pixels in memory to the next row of pixels in memory.|
743
744**Returns**
745
746| Type| Description|
747| -- | -- |
748| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
749
750### OH_AuxiliaryPictureInfo_GetPixelFormat()
751
752```
753Image_ErrorCode OH_AuxiliaryPictureInfo_GetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT *pixelFormat)
754```
755
756**Description**
757
758Obtains the pixel format of an auxiliary picture.
759
760**Since**: 13
761
762
763**Parameters**
764
765| Name| Description|
766| -- | -- |
767| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
768| [PIXEL_FORMAT](capi-pixelmap-native-h.md#pixel_format) *pixelFormat | Pointer to the pixel format obtained.|
769
770**Returns**
771
772| Type| Description|
773| -- | -- |
774| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
775
776### OH_AuxiliaryPictureInfo_SetPixelFormat()
777
778```
779Image_ErrorCode OH_AuxiliaryPictureInfo_SetPixelFormat(OH_AuxiliaryPictureInfo *info, PIXEL_FORMAT pixelFormat)
780```
781
782**Description**
783
784Sets the pixel format for an auxiliary picture.
785
786**Since**: 13
787
788
789**Parameters**
790
791| Name| Description|
792| -- | -- |
793| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
794| [PIXEL_FORMAT](capi-pixelmap-native-h.md#pixel_format) pixelFormat | Pixel format.|
795
796**Returns**
797
798| Type| Description|
799| -- | -- |
800| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
801
802### OH_AuxiliaryPictureInfo_Release()
803
804```
805Image_ErrorCode OH_AuxiliaryPictureInfo_Release(OH_AuxiliaryPictureInfo *info)
806```
807
808**Description**
809
810Releases the pointer to an OH_AuxiliaryPictureInfo object.
811
812**Since**: 13
813
814
815**Parameters**
816
817| Name| Description|
818| -- | -- |
819| [OH_AuxiliaryPictureInfo](capi-image-nativemodule-oh-auxiliarypictureinfo.md) *info | Pointer to the OH_AuxiliaryPictureInfo object.|
820
821**Returns**
822
823| Type| Description|
824| -- | -- |
825| [Image_ErrorCode](capi-image-common-h.md#image_errorcode) | **IMAGE_SUCCESS**: The operation is successful.<br>**IMAGE_BAD_PARAMETER**: A parameter is incorrect.|
826