• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup image
18  * @{
19  *
20  * @brief Provides APIs for access to the image interface.
21  *
22  * @since 12
23  */
24 
25 /**
26  * @file image_source_native.h
27  *
28  * @brief Declares APIs for decoding an image source into a pixel map.
29  *
30  * @library libimage_source.so
31  * @syscap SystemCapability.Multimedia.Image.ImageSource
32  * @since 12
33  */
34 
35 #ifndef INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_SOURCE_NATIVE_H_
36 #define INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_SOURCE_NATIVE_H_
37 #include "image_common.h"
38 
39 #include "pixelmap_native.h"
40 #include "picture_native.h"
41 #include "raw_file.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 /**
48  * @brief Defines an image source object for the image interface.
49  *
50  * @since 12
51  */
52 struct OH_ImageSourceNative;
53 typedef struct OH_ImageSourceNative OH_ImageSourceNative;
54 
55 /**
56  * @brief Defines image source infomation
57  * {@link OH_ImageSourceInfo_Create}.
58  *
59  * @since 12
60  */
61 struct OH_ImageSource_Info;
62 typedef struct OH_ImageSource_Info OH_ImageSource_Info;
63 
64 /**
65  * @brief Defines decoding options for picture
66  * {@link OH_DecodingOptionsForPicture_Create}.
67  *
68  * @since 13
69  */
70 struct OH_DecodingOptionsForPicture;
71 
72 /**
73  * @brief Defines decoding options for picture
74  * {@link OH_DecodingOptionsForPicture_Create}.
75  *
76  * @since 13
77  */
78 typedef struct OH_DecodingOptionsForPicture OH_DecodingOptionsForPicture;
79 
80 /**
81  * @brief Enumerates decoding dynamic range..
82  *
83  * @since 12
84  */
85 typedef enum {
86     /*
87     * Dynamic range depends on the image.
88     */
89     IMAGE_DYNAMIC_RANGE_AUTO = 0,
90     /*
91     * Standard dynamic range.
92     */
93     IMAGE_DYNAMIC_RANGE_SDR = 1,
94     /*
95     * High dynamic range.
96     */
97     IMAGE_DYNAMIC_RANGE_HDR = 2,
98 } IMAGE_DYNAMIC_RANGE;
99 
100 /**
101  * @brief Defines image allocator type for pixelmap
102  *
103  * @since 16
104  */
105 typedef enum {
106     /*
107     * Select allocator Type based on performance.
108     */
109     IMAGE_ALLOCATOR_TYPE_AUTO = 0,
110     /*
111     * DMA type.
112     */
113     IMAGE_ALLOCATOR_TYPE_DMA = 1,
114     /*
115     * Share memory type.
116     */
117     IMAGE_ALLOCATOR_TYPE_SHARE_MEMORY = 2,
118 } IMAGE_ALLOCATOR_TYPE;
119 
120 /**
121  * @brief The strategy for the cropping and scaling operations when both desiredSize and desiredRegion
122  * are specified.
123  *
124  * @since 18
125  */
126 typedef enum {
127     /**
128      * Scale first, then crop.
129      */
130     IMAGE_CROP_AND_SCALE_STRATEGY_SCALE_FIRST = 1,
131 
132     /**
133      * Crop first, then scale.
134      */
135     IMAGE_CROP_AND_SCALE_STRATEGY_CROP_FIRST = 2,
136 } Image_CropAndScaleStrategy;
137 
138 /**
139  * @brief Create a pointer for OH_ImageSource_Info struct.
140  *
141  * @param info The OH_ImageSource_Info pointer will be operated.
142  * @return Returns {@link Image_ErrorCode}
143  * @since 12
144  */
145 Image_ErrorCode OH_ImageSourceInfo_Create(OH_ImageSource_Info **info);
146 
147 /**
148  * @brief Get width number for OH_ImageSource_Info struct.
149  *
150  * @param info The DecodingOptions pointer will be operated.
151  * @param width the number of image width.
152  * @return Returns {@link Image_ErrorCode}
153  * @since 12
154  */
155 Image_ErrorCode OH_ImageSourceInfo_GetWidth(OH_ImageSource_Info *info, uint32_t *width);
156 
157 /**
158  * @brief Get height number for OH_ImageSource_Info struct.
159  *
160  * @param info The DecodingOptions pointer will be operated.
161  * @param height the number of image height.
162  * @return Returns {@link Image_ErrorCode}
163  * @since 12
164  */
165 Image_ErrorCode OH_ImageSourceInfo_GetHeight(OH_ImageSource_Info *info, uint32_t *height);
166 
167 /**
168  * @brief Get isHdr for OH_ImageSource_Info struct.
169  *
170  * @param info The OH_ImageSource_Info pointer will be operated.
171  * @param isHdr Whether the image has a high dynamic range.
172  * @return Returns {@link Image_ErrorCode}
173  * @since 12
174  */
175 Image_ErrorCode OH_ImageSourceInfo_GetDynamicRange(OH_ImageSource_Info *info, bool *isHdr);
176 
177 /**
178  * @brief Get mime type from OH_ImageSource_Info struct.
179  *
180  * @param info The OH_ImageSource_Info pointer will be operated.
181  * @param mimeType The mime type of the image.
182  * @return Returns {@link Image_ErrorCode} IMAGE_SUCCESS - if the operation is successful.
183  * returns {@link Image_ErrorCode} IMAGE_BAD_PARAMETER - if invalid parameter, info or mimeType is nullptr.
184  * returns {@link Image_ErrorCode} IMAGE_UNKNOWN_MIME_TYPE - if the mimeType data in OH_ImageSource_Info is nullptr.
185  * @since 16
186  */
187 Image_ErrorCode OH_ImageSourceInfo_GetMimeType(OH_ImageSource_Info *info, Image_MimeType *mimeType);
188 
189 /**
190  * @brief delete OH_ImageSource_Info pointer.
191  *
192  * @param info The OH_ImageSource_Info pointer will be operated.
193  * @return Returns {@link Image_ErrorCode}
194  * @since 12
195  */
196 Image_ErrorCode OH_ImageSourceInfo_Release(OH_ImageSource_Info *info);
197 
198 /**
199  * @brief Defines the options for decoding the image source.
200  * It is used in {@link OH_ImageSourceNative_CreatePixelmap}.
201  *
202  * @since 12
203  */
204 struct OH_DecodingOptions;
205 typedef struct OH_DecodingOptions OH_DecodingOptions;
206 
207 /**
208  * @brief Create a pointer for InitializationOtions struct.
209  *
210  * @param  options The DecodingOptions pointer will be operated.
211  * @return Returns {@link Image_ErrorCode}
212  * @since 12
213  */
214 Image_ErrorCode OH_DecodingOptions_Create(OH_DecodingOptions **options);
215 
216 /**
217  * @brief Get pixelFormat number for DecodingOptions struct.
218  *
219  * @param  options The DecodingOptions pointer will be operated.
220  * @param pixelFormat the number of image pixelFormat.
221  * @return Returns {@link Image_ErrorCode}
222  * @since 12
223  */
224 Image_ErrorCode OH_DecodingOptions_GetPixelFormat(OH_DecodingOptions *options,
225     int32_t *pixelFormat);
226 
227 /**
228  * @brief Set pixelFormat number for DecodingOptions struct.
229  *
230  * @param  options The DecodingOptions pointer will be operated.
231  * @param pixelFormat the number of image pixelFormat.
232  * @return Returns {@link Image_ErrorCode}
233  * @since 12
234  */
235 Image_ErrorCode OH_DecodingOptions_SetPixelFormat(OH_DecodingOptions *options,
236     int32_t pixelFormat);
237 
238 /**
239  * @brief Get strategy number for OH_DecodingOptions struct.
240  *
241  * @param options The OH_DecodingOptions pointer will be operated.
242  * @param cropAndScaleStrategy the number of Scaling and cropping strategy.
243  * @return Returns {@link Image_ErrorCode}
244  * @since 18
245  */
246 Image_ErrorCode OH_DecodingOptions_GetCropAndScaleStrategy(OH_DecodingOptions *options,
247     int32_t *cropAndScaleStrategy);
248 
249 /**
250  * @brief Set strategy number for OH_DecodingOptions struct.
251  *
252  * @param options The OH_DecodingOptions pointer will be operated.
253  * @param cropAndScaleStrategy the number of Scaling and cropping strategy.
254  * @return Returns {@link Image_ErrorCode}
255  * @since 18
256  */
257 Image_ErrorCode OH_DecodingOptions_SetCropAndScaleStrategy(OH_DecodingOptions *options,
258     int32_t cropAndScaleStrategy);
259 
260 /**
261  * @brief Get index number for DecodingOptions struct.
262  *
263  * @param  options The DecodingOptions pointer will be operated.
264  * @param index the number of image index.
265  * @return Returns {@link Image_ErrorCode}
266  * @since 12
267  */
268 Image_ErrorCode OH_DecodingOptions_GetIndex(OH_DecodingOptions *options, uint32_t *index);
269 
270 /**
271  * @brief Set index number for DecodingOptions struct.
272  *
273  * @param  options The DecodingOptions pointer will be operated.
274  * @param index the number of image index.
275  * @return Returns {@link Image_ErrorCode}
276  * @since 12
277  */
278 Image_ErrorCode OH_DecodingOptions_SetIndex(OH_DecodingOptions *options, uint32_t index);
279 
280 /**
281  * @brief Get rotate number for DecodingOptions struct.
282  *
283  * @param  options The DecodingOptions pointer will be operated.
284  * @param rotate the number of image rotate.
285  * @return Returns {@link Image_ErrorCode}
286  * @since 12
287  */
288 Image_ErrorCode OH_DecodingOptions_GetRotate(OH_DecodingOptions *options, float *rotate);
289 
290 /**
291  * @brief Set rotate number for DecodingOptions struct.
292  *
293  * @param  options The DecodingOptions pointer will be operated.
294  * @param rotate the number of image rotate.
295  * @return Returns {@link Image_ErrorCode}
296  * @since 12
297  */
298 Image_ErrorCode OH_DecodingOptions_SetRotate(OH_DecodingOptions *options, float rotate);
299 
300 /**
301  * @brief Get desiredSize number for DecodingOptions struct.
302  *
303  * @param  options The DecodingOptions pointer will be operated.
304  * @param desiredSize the number of image desiredSize.
305  * @return Returns {@link Image_ErrorCode}
306  * @since 12
307  */
308 Image_ErrorCode OH_DecodingOptions_GetDesiredSize(OH_DecodingOptions *options,
309     Image_Size *desiredSize);
310 
311 /**
312  * @brief Set desiredSize number for DecodingOptions struct.
313  *
314  * @param  options The DecodingOptions pointer will be operated.
315  * @param desiredSize the number of image desiredSize.
316  * @return Returns {@link Image_ErrorCode}
317  * @since 12
318  */
319 Image_ErrorCode OH_DecodingOptions_SetDesiredSize(OH_DecodingOptions *options,
320     Image_Size *desiredSize);
321 
322 /**
323  * @brief Set desiredRegion number for DecodingOptions struct.
324  *
325  * @param  options The DecodingOptions pointer will be operated.
326  * @param desiredRegion the number of image desiredRegion.
327  * @return Returns {@link Image_ErrorCode}
328  * @since 12
329  */
330 Image_ErrorCode OH_DecodingOptions_GetDesiredRegion(OH_DecodingOptions *options,
331     Image_Region *desiredRegion);
332 
333 /**
334  * @brief Set desiredRegion number for DecodingOptions struct.
335  *
336  * @param  options The DecodingOptions pointer will be operated.
337  * @param desiredRegion the number of image desiredRegion.
338  * @return Returns {@link Image_ErrorCode}
339  * @since 12
340  */
341 Image_ErrorCode OH_DecodingOptions_SetDesiredRegion(OH_DecodingOptions *options,
342     Image_Region *desiredRegion);
343 
344 /**
345  * @brief Set desiredDynamicRange number for OH_DecodingOptions struct.
346  *
347  * @param options The OH_DecodingOptions pointer will be operated.
348  * @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}.
349  * @return Returns {@link Image_ErrorCode}
350  * @since 12
351  */
352 Image_ErrorCode OH_DecodingOptions_GetDesiredDynamicRange(OH_DecodingOptions *options,
353     int32_t *desiredDynamicRange);
354 
355 /**
356  * @brief Set desiredDynamicRange number for OH_DecodingOptions struct.
357  *
358  * @param options The OH_DecodingOptions pointer will be operated.
359  * @param desiredDynamicRange the number of desired dynamic range {@link IMAGE_DYNAMIC_RANGE}.
360  * @return Returns {@link Image_ErrorCode}
361  * @since 12
362  */
363 Image_ErrorCode OH_DecodingOptions_SetDesiredDynamicRange(OH_DecodingOptions *options,
364     int32_t desiredDynamicRange);
365 
366 /**
367  * @brief delete DecodingOptions pointer.
368  *
369  * @param  options The DecodingOptions pointer will be operated.
370  * @return Returns {@link Image_ErrorCode}
371  * @since 12
372  */
373 Image_ErrorCode OH_DecodingOptions_Release(OH_DecodingOptions *options);
374 
375 /**
376  * @brief Creates an ImageSource pointer.
377  *
378  * @param uri Indicates a pointer to the image source URI. Only a file URI or Base64 URI is accepted.
379  * @param uriSize Indicates the length of the image source URI.
380  * @param res Indicates a pointer to the <b>ImageSource</b> object created at the C++ native layer.
381  * @return Returns {@link Image_ErrorCode}
382  * @since 12
383  */
384 Image_ErrorCode OH_ImageSourceNative_CreateFromUri(char *uri, size_t uriSize, OH_ImageSourceNative **res);
385 
386 /**
387  * @brief Creates an void pointer
388  *
389  * @param fd Indicates the image source file descriptor.
390  * @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.
391  * @return Returns {@link Image_ErrorCode}
392  * @since 12
393  */
394 Image_ErrorCode OH_ImageSourceNative_CreateFromFd(int32_t fd, OH_ImageSourceNative **res);
395 
396 /**
397  * @brief Creates an void pointer
398  *
399  * @param data Indicates a pointer to the image source data. Only a formatted packet data or Base64 data is accepted.
400  * @param dataSize Indicates the size of the image source data.
401  * @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.
402  * @return Returns {@link Image_ErrorCode}
403  * @since 12
404  */
405 Image_ErrorCode OH_ImageSourceNative_CreateFromData(uint8_t *data, size_t dataSize, OH_ImageSourceNative **res);
406 
407 /**
408  * @brief Creates an void pointer
409  *
410  * @param rawFile Indicates the raw file's file descriptor.
411  * @param res Indicates a void pointer to the <b>ImageSource</b> object created at the C++ native layer.
412  * @return Returns {@link Image_ErrorCode}
413  * @since 12
414  */
415 Image_ErrorCode OH_ImageSourceNative_CreateFromRawFile(RawFileDescriptor *rawFile, OH_ImageSourceNative **res);
416 
417 /**
418  * @brief Decodes an void pointer
419  * based on the specified {@link OH_DecodingOptions} struct.
420  *
421  * @param source Indicates a void pointer(from ImageSource pointer convert).
422  * @param  options Indicates a pointer to the options for decoding the image source.
423  * For details, see {@link OH_DecodingOptions}.
424  * @param resPixMap Indicates a void pointer to the <b>Pixelmap</b> object obtained at the C++ native layer.
425  * @return Returns {@link Image_ErrorCode}
426  * @since 12
427  */
428 Image_ErrorCode OH_ImageSourceNative_CreatePixelmap(OH_ImageSourceNative *source, OH_DecodingOptions *options,
429     OH_PixelmapNative **pixelmap);
430 
431 /**
432  * @brief Decodes an void pointer
433  * based on the specified {@link OH_DecodingOptions} struct, with support for specifying an optional allocator type.
434  *
435  * @param source Indicates a void pointer(from ImageSource pointer convert).
436  * @param options Indicates a pointer to the options for decoding the image source.
437  * For details, see {@link OH_DecodingOptions}.
438  * @param allocator Specifies the allocator type to be used during pixelmap creation.
439  * For details, see {@link IMAGE_ALLOCATOR_TYPE}.
440  * @param pixelmap Indicates a void pointer to the <b>Pixelmap</b> object obtained at the C++ native layer.
441  * @return Returns {@link Image_ErrorCode}
442  * @since 16
443  */
444 Image_ErrorCode OH_ImageSourceNative_CreatePixelmapUsingAllocator(OH_ImageSourceNative *source,
445     OH_DecodingOptions *options, IMAGE_ALLOCATOR_TYPE allocator, OH_PixelmapNative **pixelmap);
446 
447 /**
448  * @brief Decodes an void pointer
449  * the <b>Pixelmap</b> objects at the C++ native layer
450  * based on the specified {@link OH_DecodingOptions} struct.
451  *
452  * @param source Indicates a void pointer(from ImageSource pointer convert).
453  * @param  options Indicates a pointer to the options for decoding the image source.
454  * For details, see {@link OH_DecodingOptions}.
455  * @param resVecPixMap Indicates a pointer array to the <b>Pixelmap</b> objects obtained at the C++ native layer.
456  * It cannot be a null pointer.
457  * @param outSize Indicates a size of resVecPixMap. User can get size from {@link OH_ImageSourceNative_GetFrameCount}.
458  * @return Returns {@link Image_ErrorCode}
459  * @since 12
460  */
461 Image_ErrorCode OH_ImageSourceNative_CreatePixelmapList(OH_ImageSourceNative *source, OH_DecodingOptions *options,
462     OH_PixelmapNative *resVecPixMap[], size_t outSize);
463 
464 /**
465  * @brief Create Picture pointer from ImageSource
466  * based on the specified {@link OH_DecodingOptions} struct.
467  *
468  * @param source Indicates a void pointer(from ImageSource pointer convert).
469  * @param options Indicates a pointer to the options for decoding the image source.
470  * For details, see {@link OH_DecodingOptionsForPicture}.
471  * @param picture Indicates a void pointer to the <b>Picture</b> object obtained at the C++ native layer.
472  * @return Image functions result code.
473  *         {@link IMAGE_SUCCESS} if the execution is successful.
474  *         {@link IMAGE_BAD_PARAMETER} source is nullptr, or picture is nullptr.
475  *         {@link IMAGE_DECODE_FAILED} decode failed.
476  * @since 13
477  */
478 Image_ErrorCode OH_ImageSourceNative_CreatePicture(OH_ImageSourceNative *source, OH_DecodingOptionsForPicture *options,
479     OH_PictureNative **picture);
480 
481 /**
482  * @brief Obtains the delay time list from some <b>ImageSource</b> objects (such as GIF image sources).
483  *
484  * @param source Indicates a void pointer(from ImageSource pointer convert).
485  * @param delayTimeList Indicates a pointer to the delay time list obtained. It cannot be a null pointer.
486  * @param size Indicates a size of delayTimeList. User can get size from {@link OH_ImageSourceNative_GetFrameCount}.
487  * @return Returns {@link Image_ErrorCode}
488  * @since 12
489  */
490 Image_ErrorCode OH_ImageSourceNative_GetDelayTimeList(OH_ImageSourceNative *source,
491     int32_t *delayTimeList, size_t size);
492 
493 /**
494  * @brief Obtains image source information from an <b>ImageSource</b> object by index.
495  *
496  * @param source Indicates a void pointer(from ImageSource pointer convert).
497  * @param index Indicates the index of the frame.
498  * @param info Indicates a pointer to the image source information obtained.
499  * For details, see {@link OH_ImageSource_Info}.
500  * @return Returns {@link Image_ErrorCode}
501  * @since 12
502  */
503 Image_ErrorCode OH_ImageSourceNative_GetImageInfo(OH_ImageSourceNative *source, int32_t index,
504     OH_ImageSource_Info *info);
505 
506 /**
507  * @brief Obtains the value of an image property from an <b>ImageSource</b> object.
508  *
509  * @param source Indicates a void pointer(from ImageSource pointer convert).
510  * @param key Indicates a pointer to the property. For details, see {@link Image_String}., key is an exif constant.
511  * Release after use ImageSource, see {@link OH_ImageSourceNative_Release}.
512  * @param value Indicates a pointer to the value obtained.The user can pass in a null pointer and zero size,
513  * we will allocate memory, but user must free memory after use.
514  * @return Returns {@link Image_ErrorCode}
515  * @since 12
516  */
517 Image_ErrorCode OH_ImageSourceNative_GetImageProperty(OH_ImageSourceNative *source, Image_String *key,
518     Image_String *value);
519 
520 /**
521  * @brief Modifies the value of an image property of an <b>ImageSource</b> object.
522  * @param source Indicates a void pointer(from ImageSource pointer convert).
523  * @param key Indicates a pointer to the property. For details, see {@link Image_String}., key is an exif constant.
524  * Release after use ImageSource, see {@link OH_ImageSourceNative_Release}.
525  * @param value Indicates a pointer to the new value of the property.
526  * @return Returns {@link Image_ErrorCode}
527  * @since 12
528  */
529 Image_ErrorCode OH_ImageSourceNative_ModifyImageProperty(OH_ImageSourceNative *source, Image_String *key,
530     Image_String *value);
531 
532 /**
533  * @brief Obtains the number of frames from an <b>ImageSource</b> object.
534  *
535  * @param source Indicates a pointer to the {@link OH_ImageSourceNative} object at the C++ native layer.
536  * @param res Indicates a pointer to the number of frames obtained.
537  * @return Returns {@link Image_ErrorCode}
538  * @since 12
539  */
540 Image_ErrorCode OH_ImageSourceNative_GetFrameCount(OH_ImageSourceNative *source, uint32_t *frameCount);
541 
542 /**
543  * @brief Releases an <b>ImageSourc</b> object.
544  *
545  * @param source Indicates a ImageSource pointer.
546  * @return Returns {@link Image_ErrorCode}
547  * @since 12
548  */
549 Image_ErrorCode OH_ImageSourceNative_Release(OH_ImageSourceNative *source);
550 
551 /**
552  * @brief Create a pointer for OH_DecodingOptionsForPicture struct.
553  *
554  * @param options The OH_DecodingOptionsForPicture pointer will be operated.
555  * @return Image functions result code.
556  *         {@link IMAGE_SUCCESS} if the execution is successful.
557  *         {@link IMAGE_BAD_PARAMETER} options is nullptr.
558  * @since 13
559  */
560 Image_ErrorCode OH_DecodingOptionsForPicture_Create(OH_DecodingOptionsForPicture **options);
561 
562 /**
563  * @brief Obtains the desired auxiliary pictures of decoding options.
564  *
565  * @param options The OH_DecodingOptionsForPicture pointer will be operated.
566  * @param desiredAuxiliaryPictures The desired auxiliary pictures in DecodingOptionsForPicture.
567  * @param length The length of desired auxiliary pictures.
568  * @return Image functions result code.
569  *         {@link IMAGE_SUCCESS} if the execution is successful.
570  *         {@link IMAGE_BAD_PARAMETER} options is nullptr, desiredAuxiliaryPictures is nullptr,
571  *         or length is invalid.
572  * @since 13
573  */
574 Image_ErrorCode OH_DecodingOptionsForPicture_GetDesiredAuxiliaryPictures(OH_DecodingOptionsForPicture *options,
575     Image_AuxiliaryPictureType **desiredAuxiliaryPictures, size_t *length);
576 
577 /**
578  * @brief Set decoding options desired auxiliary pictures.
579  *
580  * @param options The OH_DecodingOptionsForPicture pointer will be operated.
581  * @param desiredAuxiliaryPictures The desired auxiliary pictures will be set.
582  * @param length The length of desired auxiliary pictures.
583  * @return Image functions result code.
584  *         {@link IMAGE_SUCCESS} if the execution is successful.
585  *         {@link IMAGE_BAD_PARAMETER} options is nullptr, desiredAuxiliaryPictures is nullptr,
586  *         or length is invalid.
587  * @since 13
588  */
589 Image_ErrorCode OH_DecodingOptionsForPicture_SetDesiredAuxiliaryPictures(OH_DecodingOptionsForPicture *options,
590     Image_AuxiliaryPictureType *desiredAuxiliaryPictures, size_t length);
591 
592 /**
593  * @brief Releases an <b>DecodingOptionsForPicture</b> object.
594  *
595  * @param options Indicates a DecodingOptionsForPicture pointer.
596  * @return Image functions result code.
597  *         {@link IMAGE_SUCCESS} if the execution is successful.
598  *         {@link IMAGE_BAD_PARAMETER} options is nullptr.
599  * @since 13
600  */
601 Image_ErrorCode OH_DecodingOptionsForPicture_Release(OH_DecodingOptionsForPicture *options);
602 #ifdef __cplusplus
603 };
604 #endif
605 /** @} */
606 #endif // INTERFACES_KITS_NATIVE_INCLUDE_IMAGE_IMAGE_SOURCE_NATIVE_H