1e41f4b71Sopenharmony_ci# ImageEffect
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciThe ImageEffect module provides the APIs for editing an image.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**Since**: 12
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci## Summary
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci### Files
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci| Name| Description| 
17e41f4b71Sopenharmony_ci| -------- | -------- |
18e41f4b71Sopenharmony_ci| [image_effect.h](image__effect_8h.md) | Declares the APIs related to an image effector.| 
19e41f4b71Sopenharmony_ci| [image_effect_errors.h](image__effect__errors_8h.md) | Declares the error codes used by an image effector.| 
20e41f4b71Sopenharmony_ci| [image_effect_filter.h](image__effect__filter_8h.md) | Declare the APIs related to an image effect filter.| 
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci### Structs
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci| Name| Description| 
26e41f4b71Sopenharmony_ci| -------- | -------- |
27e41f4b71Sopenharmony_ci| union  [ImageEffect_DataValue](union_image_effect___data_value.md) | Describes the data values.| 
28e41f4b71Sopenharmony_ci| struct  [ImageEffect_Any](_image_effect___any.md) | Describes the image effect parameters.| 
29e41f4b71Sopenharmony_ci| struct  [ImageEffect_FilterNames](_image_effect___filter_names.md) | Describes the filter name information.| 
30e41f4b71Sopenharmony_ci| struct  [ImageEffect_FilterDelegate](_image_effect___filter_delegate.md) | Describes the callback functions of a custom image effect filter.| 
31e41f4b71Sopenharmony_ci| struct  [ImageEffect_Region](_image_effect___region.md) | Describes the image region.| 
32e41f4b71Sopenharmony_ci| struct  [ImageEffect_Size](_image_effect___size.md) | Describes the image size.| 
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ci
35e41f4b71Sopenharmony_ci### Macros
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci| Name| Description| 
38e41f4b71Sopenharmony_ci| -------- | -------- |
39e41f4b71Sopenharmony_ci| [OH_EFFECT_BRIGHTNESS_FILTER](#oh_effect_brightness_filter)   "Brightness" | Brightness filter. The corresponding parameter is **OH_EFFECT_FILTER_INTENSITY_KEY** and the parameter type is **EFFECT_DATA_TYPE_FLOAT**.| 
40e41f4b71Sopenharmony_ci| [OH_EFFECT_CONTRAST_FILTER](#oh_effect_contrast_filter)   "Contrast" | Contrast filter. The corresponding parameter is **OH_EFFECT_FILTER_INTENSITY_KEY** and the parameter type is **EFFECT_DATA_TYPE_FLOAT**.| 
41e41f4b71Sopenharmony_ci| [OH_EFFECT_CROP_FILTER](#oh_effect_crop_filter)   "Crop" | Crop filter. The corresponding parameter is **OH_EFFECT_FILTER_REGION_KEY**, the parameter type is **EFFECT_DATA_TYPE_PTR**, and the parameter value is [ImageEffect_Region](_image_effect___region.md).| 
42e41f4b71Sopenharmony_ci| [OH_EFFECT_FILTER_INTENSITY_KEY](#oh_effect_filter_intensity_key)   "FilterIntensity" | Intensity filter.| 
43e41f4b71Sopenharmony_ci| [OH_EFFECT_FILTER_REGION_KEY](#oh_effect_filter_region_key)   "FilterRegion" | Image region filter.| 
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci### Types
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci| Name| Description| 
49e41f4b71Sopenharmony_ci| -------- | -------- |
50e41f4b71Sopenharmony_ci| typedef struct [OH_ImageEffect](#oh_imageeffect) [OH_ImageEffect](#oh_imageeffect) | Defines a struct for the image effector.| 
51e41f4b71Sopenharmony_ci| typedef enum [ImageEffect_ErrorCode](#imageeffect_errorcode-1) [ImageEffect_ErrorCode](#imageeffect_errorcode) | Defines an enum for the error codes used by the image effector.| 
52e41f4b71Sopenharmony_ci| typedef struct [OH_EffectFilter](#oh_effectfilter) [OH_EffectFilter](#oh_effectfilter) | Defines a struct for the image effect filter.| 
53e41f4b71Sopenharmony_ci| typedef enum [ImageEffect_DataType](#imageeffect_datatype) [ImageEffect_DataType](#imageeffect_datatype) | Defines an enum for the data types.| 
54e41f4b71Sopenharmony_ci| typedef union [ImageEffect_DataValue](union_image_effect___data_value.md) [ImageEffect_DataValue](#imageeffect_datavalue) | Defines a union for the data values.| 
55e41f4b71Sopenharmony_ci| typedef struct [ImageEffect_Any](_image_effect___any.md) [ImageEffect_Any](#imageeffect_any) | Defines a struct for the image effect parameters.| 
56e41f4b71Sopenharmony_ci| typedef enum [ImageEffect_Format](#imageeffect_format-1) [ImageEffect_Format](#imageeffect_format) | Defines an enum for the pixel formats.| 
57e41f4b71Sopenharmony_ci| typedef enum [ImageEffect_BufferType](#imageeffect_buffertype-1) [ImageEffect_BufferType](#imageeffect_buffertype) | Defines an enum for the buffer types.| 
58e41f4b71Sopenharmony_ci| typedef struct [OH_EffectFilterInfo](#oh_effectfilterinfo) [OH_EffectFilterInfo](#oh_effectfilterinfo) | Defines a struct for the image effect filter information.| 
59e41f4b71Sopenharmony_ci| typedef struct [ImageEffect_FilterNames](_image_effect___filter_names.md) [ImageEffect_FilterNames](#imageeffect_filternames) | Defines a struct for the filter name information.| 
60e41f4b71Sopenharmony_ci| typedef struct [OH_EffectBufferInfo](#oh_effectbufferinfo) [OH_EffectBufferInfo](#oh_effectbufferinfo) | Defines a struct for the image buffer information.| 
61e41f4b71Sopenharmony_ci| typedef bool(\* [OH_EffectFilterDelegate_SetValue](#oh_effectfilterdelegate_setvalue)) ([OH_EffectFilter](#oh_effectfilter) \*filter, const char \*key, const [ImageEffect_Any](_image_effect___any.md) \*value) | Defines a pointer to the callback function for setting parameters of a custom filter. It is used to verify parameters and parameter values.| 
62e41f4b71Sopenharmony_ci| typedef void(\* [OH_EffectFilterDelegate_PushData](#oh_effectfilterdelegate_pushdata)) ([OH_EffectFilter](#oh_effectfilter) \*filter, [OH_EffectBufferInfo](#oh_effectbufferinfo) \*info) | Defines a pointer to the callback function used by a custom filter to push image data to the next-level filter.| 
63e41f4b71Sopenharmony_ci| typedef bool(\* [OH_EffectFilterDelegate_Render](#oh_effectfilterdelegate_render)) ([OH_EffectFilter](#oh_effectfilter) \*filter, [OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, [OH_EffectFilterDelegate_PushData](#oh_effectfilterdelegate_pushdata) pushData) | Defines a pointer to the callback function for rendering an image using a custom filter.| 
64e41f4b71Sopenharmony_ci| typedef bool(\* [OH_EffectFilterDelegate_Save](#oh_effectfilterdelegate_save)) ([OH_EffectFilter](#oh_effectfilter) \*filter, char \*\*info) | Defines a pointer to the callback function for serializing a custom filter. Filters are serialized in JSON format.| 
65e41f4b71Sopenharmony_ci| typedef [OH_EffectFilter](#oh_effectfilter) \*(\* [OH_EffectFilterDelegate_Restore](#oh_effectfilterdelegate_restore)) (const char \*info) | Defines a pointer to the callback function for deserializing a custom filter.| 
66e41f4b71Sopenharmony_ci| typedef struct [ImageEffect_FilterDelegate](_image_effect___filter_delegate.md) [ImageEffect_FilterDelegate](#imageeffect_filterdelegate) | Defines a struct for the callback functions of a custom image effect filter.| 
67e41f4b71Sopenharmony_ci| typedef struct [ImageEffect_Region](_image_effect___region.md) [ImageEffect_Region](#imageeffect_region) | Defines a struct for the image region.| 
68e41f4b71Sopenharmony_ci| typedef struct [ImageEffect_Size](_image_effect___size.md) [ImageEffect_Size](#imageeffect_size) | Defines a struct for the image size.| 
69e41f4b71Sopenharmony_ci
70e41f4b71Sopenharmony_ci
71e41f4b71Sopenharmony_ci### Enums
72e41f4b71Sopenharmony_ci
73e41f4b71Sopenharmony_ci| Name| Description| 
74e41f4b71Sopenharmony_ci| -------- | -------- |
75e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode-1) {<br>EFFECT_SUCCESS = 0, EFFECT_ERROR_PERMISSION_DENIED = 201,<br>EFFECT_ERROR_PARAM_INVALID = 401, EFFECT_BUFFER_SIZE_NOT_MATCH = 29000001,<br>EFFECT_COLOR_SPACE_NOT_MATCH = 29000002, EFFECT_INPUT_OUTPUT_NOT_MATCH = 29000101,<br>EFFECT_EFFECT_NUMBER_LIMITED = 29000102, EFFECT_INPUT_OUTPUT_NOT_SUPPORTED = 29000103,<br>EFFECT_ALLOCATE_MEMORY_FAILED = 29000104, EFFECT_PARAM_ERROR = 29000121,<br>EFFECT_KEY_ERROR = 29000122, EFFECT_UNKNOWN = 29000199<br>} | Enumerates the error codes used by the image effector.| 
76e41f4b71Sopenharmony_ci| [ImageEffect_DataType](#imageeffect_datatype-1) {<br>EFFECT_DATA_TYPE_UNKNOWN = 0, EFFECT_DATA_TYPE_INT32 = 1,<br>EFFECT_DATA_TYPE_FLOAT = 2, EFFECT_DATA_TYPE_DOUBLE = 3,<br>EFFECT_DATA_TYPE_CHAR = 4, EFFECT_DATA_TYPE_LONG = 5,<br>EFFECT_DATA_TYPE_BOOL = 6, EFFECT_DATA_TYPE_PTR = 7<br>} | Enumerates the data types.| 
77e41f4b71Sopenharmony_ci| [ImageEffect_Format](#imageeffect_format-1) {<br>EFFECT_PIXEL_FORMAT_UNKNOWN = 0, EFFECT_PIXEL_FORMAT_RGBA8888 = 1,<br>EFFECT_PIXEL_FORMAT_NV21 = 2, EFFECT_PIXEL_FORMAT_NV12 = 3,<br>EFFECT_PIXEL_FORMAT_RGBA1010102 = 4, EFFECT_PIXEL_FORMAT_YCBCR_P010 = 5,<br>EFFECT_PIXEL_FORMAT_YCRCB_P010 = 6<br>} | Enumerates the pixel formats.| 
78e41f4b71Sopenharmony_ci| [ImageEffect_BufferType](#imageeffect_buffertype-1) { EFFECT_BUFFER_TYPE_UNKNOWN = 0,<br>EFFECT_BUFFER_TYPE_PIXEL = 1, EFFECT_BUFFER_TYPE_TEXTURE = 2 } | Enumerates the buffer types.| 
79e41f4b71Sopenharmony_ci
80e41f4b71Sopenharmony_ci
81e41f4b71Sopenharmony_ci### Functions
82e41f4b71Sopenharmony_ci
83e41f4b71Sopenharmony_ci| Name| Description| 
84e41f4b71Sopenharmony_ci| -------- | -------- |
85e41f4b71Sopenharmony_ci| [OH_ImageEffect](#oh_imageeffect) \* [OH_ImageEffect_Create](#oh_imageeffect_create) (const char \*name) | Creates an **OH_ImageEffect** instance. The instance must be released by calling [OH_ImageEffect_Release](#oh_imageeffect_release) when it is no longer needed.| 
86e41f4b71Sopenharmony_ci| [OH_EffectFilter](#oh_effectfilter) \* [OH_ImageEffect_AddFilter](#oh_imageeffect_addfilter) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, const char \*filterName) | Adds a filter.| 
87e41f4b71Sopenharmony_ci| [OH_EffectFilter](#oh_effectfilter) \* [OH_ImageEffect_InsertFilter](#oh_imageeffect_insertfilter) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, uint32_t index, const char \*filterName) | Inserts a filter.| 
88e41f4b71Sopenharmony_ci| int32_t [OH_ImageEffect_RemoveFilter](#oh_imageeffect_removefilter) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, const char \*filterName) | Removes a filter.| 
89e41f4b71Sopenharmony_ci| int32_t [OH_ImageEffect_GetFilterCount](#oh_imageeffect_getfiltercount) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect) | Obtains the number of added filters.| 
90e41f4b71Sopenharmony_ci| [OH_EffectFilter](#oh_effectfilter) \* [OH_ImageEffect_GetFilter](#oh_imageeffect_getfilter) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, uint32_t index) | Obtains the information about a filter.| 
91e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_Configure](#oh_imageeffect_configure) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, const char \*key, const [ImageEffect_Any](_image_effect___any.md) \*value) | Configures an image effector.| 
92e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetOutputSurface](#oh_imageeffect_setoutputsurface) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, OHNativeWindow \*nativeWindow) | Sets an output surface.| 
93e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_GetInputSurface](#oh_imageeffect_getinputsurface) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, OHNativeWindow \*\*nativeWindow) | Obtains an input surface.| 
94e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetInputPixelmap](#oh_imageeffect_setinputpixelmap) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, OH_PixelmapNative \*pixelmap) | Sets an input pixel map.| 
95e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetOutputPixelmap](#oh_imageeffect_setoutputpixelmap) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, OH_PixelmapNative \*pixelmap) | Sets an output pixel map.| 
96e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetInputNativeBuffer](#oh_imageeffect_setinputnativebuffer) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, OH_NativeBuffer \*nativeBuffer) | Sets an input native buffer.| 
97e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetOutputNativeBuffer](#oh_imageeffect_setoutputnativebuffer) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, OH_NativeBuffer \*nativeBuffer) | Sets an output native buffer.| 
98e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetInputUri](#oh_imageeffect_setinputuri) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, const char \*uri) | Sets an input URI.| 
99e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_SetOutputUri](#oh_imageeffect_setoutputuri) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, const char \*uri) | Sets an output URI.| 
100e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_Start](#oh_imageeffect_start) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect) | Starts an image effector.| 
101e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_Stop](#oh_imageeffect_stop) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect) | Stops an image effector.| 
102e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_Release](#oh_imageeffect_release) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect) | Releases an **OH_ImageEffect** instance.| 
103e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_ImageEffect_Save](#oh_imageeffect_save) ([OH_ImageEffect](#oh_imageeffect) \*imageEffect, char \*\*info) | Serializes an image effector.| 
104e41f4b71Sopenharmony_ci| [OH_ImageEffect](#oh_imageeffect) \* [OH_ImageEffect_Restore](#oh_imageeffect_restore) (const char \*info) | Deserializes an image effector.| 
105e41f4b71Sopenharmony_ci| [OH_EffectFilterInfo](#oh_effectfilterinfo) \* [OH_EffectFilterInfo_Create](#oh_effectfilterinfo_create) () | Creates an **OH_EffectFilterInfo** instance. The instance must be released by calling [OH_EffectFilterInfo_Release](#oh_effectfilterinfo_release) when it is no longer needed.| 
106e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_SetFilterName](#oh_effectfilterinfo_setfiltername) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, const char \*name) | Sets a filter name.| 
107e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_GetFilterName](#oh_effectfilterinfo_getfiltername) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, char \*\*name) | Obtains a filter name.| 
108e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_SetSupportedBufferTypes](#oh_effectfilterinfo_setsupportedbuffertypes) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, uint32_t size, [ImageEffect_BufferType](#imageeffect_buffertype) \*bufferTypeArray) | Sets the buffer types supported by a filter.| 
109e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_GetSupportedBufferTypes](#oh_effectfilterinfo_getsupportedbuffertypes) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, uint32_t \*size, [ImageEffect_BufferType](#imageeffect_buffertype) \*\*bufferTypeArray) | Obtains the buffer types supported by a filter.| 
110e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_SetSupportedFormats](#oh_effectfilterinfo_setsupportedformats) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, uint32_t size, [ImageEffect_Format](#imageeffect_format) \*formatArray) | Sets the pixel formats supported by a filter.| 
111e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_GetSupportedFormats](#oh_effectfilterinfo_getsupportedformats) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, uint32_t \*size, [ImageEffect_Format](#imageeffect_format) \*\*formatArray) | Obtains the pixel formats supported by a filter.| 
112e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilterInfo_Release](#oh_effectfilterinfo_release) ([OH_EffectFilterInfo](#oh_effectfilterinfo) \*info) | Destroys an **OH_EffectFilterInfo** instance.| 
113e41f4b71Sopenharmony_ci| [OH_EffectBufferInfo](#oh_effectbufferinfo) \* [OH_EffectBufferInfo_Create](#oh_effectbufferinfo_create) () | Creates an **OH_EffectBufferInfo** instance. The instance must be released by calling [OH_EffectBufferInfo_Release](#oh_effectbufferinfo_release) when it is no longer needed.| 
114e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_SetAddr](#oh_effectbufferinfo_setaddr) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, void \*addr) | Sets the address of an effect buffer.| 
115e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_GetAddr](#oh_effectbufferinfo_getaddr) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, void \*\*addr) | Obtains the address of an effect buffer.| 
116e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_SetWidth](#oh_effectbufferinfo_setwidth) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, int32_t width) | Sets the image width.| 
117e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_GetWidth](#oh_effectbufferinfo_getwidth) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, int32_t \*width) | Obtains the image width.| 
118e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_SetHeight](#oh_effectbufferinfo_setheight) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, int32_t height) | Sets the image height.| 
119e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_GetHeight](#oh_effectbufferinfo_getheight) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, int32_t \*height) | Obtains the image height.| 
120e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_SetRowSize](#oh_effectbufferinfo_setrowsize) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, int32_t rowSize) | Sets the number of bytes per row for an image.| 
121e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_GetRowSize](#oh_effectbufferinfo_getrowsize) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, int32_t \*rowSize) | Obtains the number of bytes per row of an image.| 
122e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_SetEffectFormat](#oh_effectbufferinfo_seteffectformat) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, [ImageEffect_Format](#imageeffect_format) format) | Sets the pixel format for an image.| 
123e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_GetEffectFormat](#oh_effectbufferinfo_geteffectformat) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info, [ImageEffect_Format](#imageeffect_format) \*format) | Obtains the pixel format of an image.| 
124e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectBufferInfo_Release](#oh_effectbufferinfo_release) ([OH_EffectBufferInfo](#oh_effectbufferinfo) \*info) | Destroys an **OH_EffectBufferInfo** instance.| 
125e41f4b71Sopenharmony_ci| [OH_EffectFilter](#oh_effectfilter) \* [OH_EffectFilter_Create](#oh_effectfilter_create) (const char \*name) | Creates an **OH_EffectFilter** instance. The instance must be released by calling [OH_EffectFilter_Release](#oh_effectfilter_release) when it is no longer needed.| 
126e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilter_SetValue](#oh_effectfilter_setvalue) ([OH_EffectFilter](#oh_effectfilter) \*filter, const char \*key, const [ImageEffect_Any](_image_effect___any.md) \*value) | Sets a filter parameter.| 
127e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilter_GetValue](#oh_effectfilter_getvalue) ([OH_EffectFilter](#oh_effectfilter) \*filter, const char \*key, [ImageEffect_Any](_image_effect___any.md) \*value) | Obtains a filter parameter.| 
128e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilter_Register](#oh_effectfilter_register) (const [OH_EffectFilterInfo](#oh_effectfilterinfo) \*info, const [ImageEffect_FilterDelegate](_image_effect___filter_delegate.md) \*delegate) | Registers a custom filter.| 
129e41f4b71Sopenharmony_ci| [ImageEffect_FilterNames](_image_effect___filter_names.md) \* [OH_EffectFilter_LookupFilters](#oh_effectfilter_lookupfilters) (const char \*key) | Obtains filters that meet given conditions.| 
130e41f4b71Sopenharmony_ci| void [OH_EffectFilter_ReleaseFilterNames](#oh_effectfilter_releasefilternames) () | Releases filter name memory resources.| 
131e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilter_LookupFilterInfo](#oh_effectfilter_lookupfilterinfo) (const char \*name, [OH_EffectFilterInfo](#oh_effectfilterinfo) \*info) | Obtains the filter information.| 
132e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilter_Render](#oh_effectfilter_render) ([OH_EffectFilter](#oh_effectfilter) \*filter, OH_PixelmapNative \*inputPixelmap, OH_PixelmapNative \*outputPixelmap) | Starts image rendering.| 
133e41f4b71Sopenharmony_ci| [ImageEffect_ErrorCode](#imageeffect_errorcode) [OH_EffectFilter_Release](#oh_effectfilter_release) ([OH_EffectFilter](#oh_effectfilter) \*filter) | Destroys an **OH_EffectFilter** instance.| 
134e41f4b71Sopenharmony_ci
135e41f4b71Sopenharmony_ci
136e41f4b71Sopenharmony_ci## Macro Description
137e41f4b71Sopenharmony_ci
138e41f4b71Sopenharmony_ci
139e41f4b71Sopenharmony_ci### OH_EFFECT_BRIGHTNESS_FILTER
140e41f4b71Sopenharmony_ci
141e41f4b71Sopenharmony_ci```
142e41f4b71Sopenharmony_ci#define OH_EFFECT_BRIGHTNESS_FILTER   "Brightness"
143e41f4b71Sopenharmony_ci```
144e41f4b71Sopenharmony_ci
145e41f4b71Sopenharmony_ci**Description**
146e41f4b71Sopenharmony_ci
147e41f4b71Sopenharmony_ciBrightness filter. The corresponding parameter is **OH_EFFECT_FILTER_INTENSITY_KEY** and the parameter type is **EFFECT_DATA_TYPE_FLOAT**.
148e41f4b71Sopenharmony_ci
149e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
150e41f4b71Sopenharmony_ci
151e41f4b71Sopenharmony_ci**Since**: 12
152e41f4b71Sopenharmony_ci
153e41f4b71Sopenharmony_ci
154e41f4b71Sopenharmony_ci### OH_EFFECT_CONTRAST_FILTER
155e41f4b71Sopenharmony_ci
156e41f4b71Sopenharmony_ci```
157e41f4b71Sopenharmony_ci#define OH_EFFECT_CONTRAST_FILTER   "Contrast"
158e41f4b71Sopenharmony_ci```
159e41f4b71Sopenharmony_ci
160e41f4b71Sopenharmony_ci**Description**
161e41f4b71Sopenharmony_ci
162e41f4b71Sopenharmony_ciContrast filter. The corresponding parameter is **OH_EFFECT_FILTER_INTENSITY_KEY** and the parameter type is **EFFECT_DATA_TYPE_FLOAT**.
163e41f4b71Sopenharmony_ci
164e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
165e41f4b71Sopenharmony_ci
166e41f4b71Sopenharmony_ci**Since**: 12
167e41f4b71Sopenharmony_ci
168e41f4b71Sopenharmony_ci
169e41f4b71Sopenharmony_ci### OH_EFFECT_CROP_FILTER
170e41f4b71Sopenharmony_ci
171e41f4b71Sopenharmony_ci```
172e41f4b71Sopenharmony_ci#define OH_EFFECT_CROP_FILTER   "Crop"
173e41f4b71Sopenharmony_ci```
174e41f4b71Sopenharmony_ci
175e41f4b71Sopenharmony_ci**Description**
176e41f4b71Sopenharmony_ci
177e41f4b71Sopenharmony_ciCrop filter. The corresponding parameter is **OH_EFFECT_FILTER_REGION_KEY**, the parameter type is **EFFECT_DATA_TYPE_PTR**, and the parameter value is [ImageEffect_Region](_image_effect___region.md).
178e41f4b71Sopenharmony_ci
179e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
180e41f4b71Sopenharmony_ci
181e41f4b71Sopenharmony_ci**Since**: 12
182e41f4b71Sopenharmony_ci
183e41f4b71Sopenharmony_ci
184e41f4b71Sopenharmony_ci### OH_EFFECT_FILTER_INTENSITY_KEY
185e41f4b71Sopenharmony_ci
186e41f4b71Sopenharmony_ci```
187e41f4b71Sopenharmony_ci#define OH_EFFECT_FILTER_INTENSITY_KEY   "FilterIntensity"
188e41f4b71Sopenharmony_ci```
189e41f4b71Sopenharmony_ci
190e41f4b71Sopenharmony_ci**Description**
191e41f4b71Sopenharmony_ci
192e41f4b71Sopenharmony_ciIntensity filter.
193e41f4b71Sopenharmony_ci
194e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
195e41f4b71Sopenharmony_ci
196e41f4b71Sopenharmony_ci**Since**: 12
197e41f4b71Sopenharmony_ci
198e41f4b71Sopenharmony_ci
199e41f4b71Sopenharmony_ci### OH_EFFECT_FILTER_REGION_KEY
200e41f4b71Sopenharmony_ci
201e41f4b71Sopenharmony_ci```
202e41f4b71Sopenharmony_ci#define OH_EFFECT_FILTER_REGION_KEY   "FilterRegion"
203e41f4b71Sopenharmony_ci```
204e41f4b71Sopenharmony_ci
205e41f4b71Sopenharmony_ci**Description**
206e41f4b71Sopenharmony_ci
207e41f4b71Sopenharmony_ciImage region filter.
208e41f4b71Sopenharmony_ci
209e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
210e41f4b71Sopenharmony_ci
211e41f4b71Sopenharmony_ci**Since**: 12
212e41f4b71Sopenharmony_ci
213e41f4b71Sopenharmony_ci
214e41f4b71Sopenharmony_ci## Type Description
215e41f4b71Sopenharmony_ci
216e41f4b71Sopenharmony_ci
217e41f4b71Sopenharmony_ci### ImageEffect_Any
218e41f4b71Sopenharmony_ci
219e41f4b71Sopenharmony_ci```
220e41f4b71Sopenharmony_citypedef struct ImageEffect_Any ImageEffect_Any
221e41f4b71Sopenharmony_ci```
222e41f4b71Sopenharmony_ci
223e41f4b71Sopenharmony_ci**Description**
224e41f4b71Sopenharmony_ci
225e41f4b71Sopenharmony_ciDescribes the image effect parameters.
226e41f4b71Sopenharmony_ci
227e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
228e41f4b71Sopenharmony_ci
229e41f4b71Sopenharmony_ci**Since**: 12
230e41f4b71Sopenharmony_ci
231e41f4b71Sopenharmony_ci
232e41f4b71Sopenharmony_ci### ImageEffect_BufferType
233e41f4b71Sopenharmony_ci
234e41f4b71Sopenharmony_ci```
235e41f4b71Sopenharmony_citypedef enum ImageEffect_BufferType ImageEffect_BufferType
236e41f4b71Sopenharmony_ci```
237e41f4b71Sopenharmony_ci
238e41f4b71Sopenharmony_ci**Description**
239e41f4b71Sopenharmony_ci
240e41f4b71Sopenharmony_ciDefines an enum for the buffer types.
241e41f4b71Sopenharmony_ci
242e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
243e41f4b71Sopenharmony_ci
244e41f4b71Sopenharmony_ci**Since**: 12
245e41f4b71Sopenharmony_ci
246e41f4b71Sopenharmony_ci
247e41f4b71Sopenharmony_ci### ImageEffect_DataType
248e41f4b71Sopenharmony_ci
249e41f4b71Sopenharmony_ci```
250e41f4b71Sopenharmony_citypedef enum ImageEffect_DataType ImageEffect_DataType
251e41f4b71Sopenharmony_ci```
252e41f4b71Sopenharmony_ci
253e41f4b71Sopenharmony_ci**Description**
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ciDefines an enum for the data types.
256e41f4b71Sopenharmony_ci
257e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ci**Since**: 12
260e41f4b71Sopenharmony_ci
261e41f4b71Sopenharmony_ci
262e41f4b71Sopenharmony_ci### ImageEffect_DataValue
263e41f4b71Sopenharmony_ci
264e41f4b71Sopenharmony_ci```
265e41f4b71Sopenharmony_citypedef union ImageEffect_DataValue ImageEffect_DataValue
266e41f4b71Sopenharmony_ci```
267e41f4b71Sopenharmony_ci
268e41f4b71Sopenharmony_ci**Description**
269e41f4b71Sopenharmony_ci
270e41f4b71Sopenharmony_ciDefines a union for the data values.
271e41f4b71Sopenharmony_ci
272e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
273e41f4b71Sopenharmony_ci
274e41f4b71Sopenharmony_ci**Since**: 12
275e41f4b71Sopenharmony_ci
276e41f4b71Sopenharmony_ci
277e41f4b71Sopenharmony_ci### ImageEffect_ErrorCode
278e41f4b71Sopenharmony_ci
279e41f4b71Sopenharmony_ci```
280e41f4b71Sopenharmony_citypedef enum ImageEffect_ErrorCode ImageEffect_ErrorCode
281e41f4b71Sopenharmony_ci```
282e41f4b71Sopenharmony_ci
283e41f4b71Sopenharmony_ci**Description**
284e41f4b71Sopenharmony_ci
285e41f4b71Sopenharmony_ciDefines an enum for the error codes used by the image effector.
286e41f4b71Sopenharmony_ci
287e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
288e41f4b71Sopenharmony_ci
289e41f4b71Sopenharmony_ci**Since**: 12
290e41f4b71Sopenharmony_ci
291e41f4b71Sopenharmony_ci
292e41f4b71Sopenharmony_ci### ImageEffect_FilterDelegate
293e41f4b71Sopenharmony_ci
294e41f4b71Sopenharmony_ci```
295e41f4b71Sopenharmony_citypedef struct ImageEffect_FilterDelegate ImageEffect_FilterDelegate
296e41f4b71Sopenharmony_ci```
297e41f4b71Sopenharmony_ci
298e41f4b71Sopenharmony_ci**Description**
299e41f4b71Sopenharmony_ci
300e41f4b71Sopenharmony_ciDescribes the callback functions of a custom image effect filter.
301e41f4b71Sopenharmony_ci
302e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
303e41f4b71Sopenharmony_ci
304e41f4b71Sopenharmony_ci**Since**: 12
305e41f4b71Sopenharmony_ci
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ci### ImageEffect_FilterNames
308e41f4b71Sopenharmony_ci
309e41f4b71Sopenharmony_ci```
310e41f4b71Sopenharmony_citypedef struct ImageEffect_FilterNames ImageEffect_FilterNames
311e41f4b71Sopenharmony_ci```
312e41f4b71Sopenharmony_ci
313e41f4b71Sopenharmony_ci**Description**
314e41f4b71Sopenharmony_ci
315e41f4b71Sopenharmony_ciDescribes the filter name information.
316e41f4b71Sopenharmony_ci
317e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
318e41f4b71Sopenharmony_ci
319e41f4b71Sopenharmony_ci**Since**: 12
320e41f4b71Sopenharmony_ci
321e41f4b71Sopenharmony_ci
322e41f4b71Sopenharmony_ci### ImageEffect_Format
323e41f4b71Sopenharmony_ci
324e41f4b71Sopenharmony_ci```
325e41f4b71Sopenharmony_citypedef enum ImageEffect_Format ImageEffect_Format
326e41f4b71Sopenharmony_ci```
327e41f4b71Sopenharmony_ci
328e41f4b71Sopenharmony_ci**Description**
329e41f4b71Sopenharmony_ci
330e41f4b71Sopenharmony_ciDefines an enum for the pixel formats.
331e41f4b71Sopenharmony_ci
332e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
333e41f4b71Sopenharmony_ci
334e41f4b71Sopenharmony_ci**Since**: 12
335e41f4b71Sopenharmony_ci
336e41f4b71Sopenharmony_ci
337e41f4b71Sopenharmony_ci### ImageEffect_Region
338e41f4b71Sopenharmony_ci
339e41f4b71Sopenharmony_ci```
340e41f4b71Sopenharmony_citypedef struct ImageEffect_Region ImageEffect_Region
341e41f4b71Sopenharmony_ci```
342e41f4b71Sopenharmony_ci
343e41f4b71Sopenharmony_ci**Description**
344e41f4b71Sopenharmony_ci
345e41f4b71Sopenharmony_ciDescribes the image region.
346e41f4b71Sopenharmony_ci
347e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
348e41f4b71Sopenharmony_ci
349e41f4b71Sopenharmony_ci**Since**: 12
350e41f4b71Sopenharmony_ci
351e41f4b71Sopenharmony_ci
352e41f4b71Sopenharmony_ci### ImageEffect_Size
353e41f4b71Sopenharmony_ci
354e41f4b71Sopenharmony_ci```
355e41f4b71Sopenharmony_citypedef struct ImageEffect_Size ImageEffect_Size
356e41f4b71Sopenharmony_ci```
357e41f4b71Sopenharmony_ci
358e41f4b71Sopenharmony_ci**Description**
359e41f4b71Sopenharmony_ci
360e41f4b71Sopenharmony_ciDescribes the image size.
361e41f4b71Sopenharmony_ci
362e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
363e41f4b71Sopenharmony_ci
364e41f4b71Sopenharmony_ci**Since**: 12
365e41f4b71Sopenharmony_ci
366e41f4b71Sopenharmony_ci
367e41f4b71Sopenharmony_ci### OH_EffectBufferInfo
368e41f4b71Sopenharmony_ci
369e41f4b71Sopenharmony_ci```
370e41f4b71Sopenharmony_citypedef struct OH_EffectBufferInfo OH_EffectBufferInfo
371e41f4b71Sopenharmony_ci```
372e41f4b71Sopenharmony_ci
373e41f4b71Sopenharmony_ci**Description**
374e41f4b71Sopenharmony_ci
375e41f4b71Sopenharmony_ciDefines a struct for the image buffer information.
376e41f4b71Sopenharmony_ci
377e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
378e41f4b71Sopenharmony_ci
379e41f4b71Sopenharmony_ci**Since**: 12
380e41f4b71Sopenharmony_ci
381e41f4b71Sopenharmony_ci
382e41f4b71Sopenharmony_ci### OH_EffectFilter
383e41f4b71Sopenharmony_ci
384e41f4b71Sopenharmony_ci```
385e41f4b71Sopenharmony_citypedef struct OH_EffectFilter OH_EffectFilter
386e41f4b71Sopenharmony_ci```
387e41f4b71Sopenharmony_ci
388e41f4b71Sopenharmony_ci**Description**
389e41f4b71Sopenharmony_ci
390e41f4b71Sopenharmony_ciDefines a struct for the image effect filter.
391e41f4b71Sopenharmony_ci
392e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
393e41f4b71Sopenharmony_ci
394e41f4b71Sopenharmony_ci**Since**: 12
395e41f4b71Sopenharmony_ci
396e41f4b71Sopenharmony_ci
397e41f4b71Sopenharmony_ci### OH_EffectFilterDelegate_PushData
398e41f4b71Sopenharmony_ci
399e41f4b71Sopenharmony_ci```
400e41f4b71Sopenharmony_citypedef void(* OH_EffectFilterDelegate_PushData) (OH_EffectFilter *filter, OH_EffectBufferInfo *info)
401e41f4b71Sopenharmony_ci```
402e41f4b71Sopenharmony_ci
403e41f4b71Sopenharmony_ci**Description**
404e41f4b71Sopenharmony_ci
405e41f4b71Sopenharmony_ciDefines a pointer to the callback function used by a custom filter to push image data to the next-level filter. The function pointer must be actively called in the callback of [OH_EffectFilterDelegate_Render](#oh_effectfilterdelegate_render).
406e41f4b71Sopenharmony_ci
407e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
408e41f4b71Sopenharmony_ci
409e41f4b71Sopenharmony_ci**Since**: 12
410e41f4b71Sopenharmony_ci
411e41f4b71Sopenharmony_ci**Parameters**
412e41f4b71Sopenharmony_ci
413e41f4b71Sopenharmony_ci| Name| Description| 
414e41f4b71Sopenharmony_ci| -------- | -------- |
415e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
416e41f4b71Sopenharmony_ci| info | Pointer to the buffer information, which is [OH_EffectBufferInfo](#oh_effectbufferinfo).| 
417e41f4b71Sopenharmony_ci
418e41f4b71Sopenharmony_ci
419e41f4b71Sopenharmony_ci### OH_EffectFilterDelegate_Render
420e41f4b71Sopenharmony_ci
421e41f4b71Sopenharmony_ci```
422e41f4b71Sopenharmony_citypedef bool(* OH_EffectFilterDelegate_Render) (OH_EffectFilter *filter, OH_EffectBufferInfo *info, OH_EffectFilterDelegate_PushData pushData)
423e41f4b71Sopenharmony_ci```
424e41f4b71Sopenharmony_ci
425e41f4b71Sopenharmony_ci**Description**
426e41f4b71Sopenharmony_ci
427e41f4b71Sopenharmony_ciDefines a pointer to the callback function for rendering an image using a custom filter.
428e41f4b71Sopenharmony_ci
429e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
430e41f4b71Sopenharmony_ci
431e41f4b71Sopenharmony_ci**Since**: 12
432e41f4b71Sopenharmony_ci
433e41f4b71Sopenharmony_ci**Parameters**
434e41f4b71Sopenharmony_ci
435e41f4b71Sopenharmony_ci| Name| Description| 
436e41f4b71Sopenharmony_ci| -------- | -------- |
437e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
438e41f4b71Sopenharmony_ci| info | Pointer to the buffer information, which is [OH_EffectBufferInfo](#oh_effectbufferinfo).| 
439e41f4b71Sopenharmony_ci| pushData | Callback function [OH_EffectFilterDelegate_PushData](#oh_effectfilterdelegate_pushdata) used by the custom filter to push image data to the next-level filter.| 
440e41f4b71Sopenharmony_ci
441e41f4b71Sopenharmony_ci**Returns**
442e41f4b71Sopenharmony_ci
443e41f4b71Sopenharmony_ciReturns **true** if the operation is successful; returns **false** otherwise.
444e41f4b71Sopenharmony_ci
445e41f4b71Sopenharmony_ci
446e41f4b71Sopenharmony_ci### OH_EffectFilterDelegate_Restore
447e41f4b71Sopenharmony_ci
448e41f4b71Sopenharmony_ci```
449e41f4b71Sopenharmony_citypedef OH_EffectFilter*(* OH_EffectFilterDelegate_Restore) (const char *info)
450e41f4b71Sopenharmony_ci```
451e41f4b71Sopenharmony_ci
452e41f4b71Sopenharmony_ci**Description**
453e41f4b71Sopenharmony_ci
454e41f4b71Sopenharmony_ciDefines a pointer to the callback function for deserializing a custom filter.
455e41f4b71Sopenharmony_ci
456e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
457e41f4b71Sopenharmony_ci
458e41f4b71Sopenharmony_ci**Since**: 12
459e41f4b71Sopenharmony_ci
460e41f4b71Sopenharmony_ci**Parameters**
461e41f4b71Sopenharmony_ci
462e41f4b71Sopenharmony_ci| Name| Description| 
463e41f4b71Sopenharmony_ci| -------- | -------- |
464e41f4b71Sopenharmony_ci| info | Pointer to a serialized JSON string.| 
465e41f4b71Sopenharmony_ci
466e41f4b71Sopenharmony_ci**Returns**
467e41f4b71Sopenharmony_ci
468e41f4b71Sopenharmony_ciReturns an **OH_EffectFilter** instance if the operation is successful; returns a null pointer otherwise.
469e41f4b71Sopenharmony_ci
470e41f4b71Sopenharmony_ci
471e41f4b71Sopenharmony_ci### OH_EffectFilterDelegate_Save
472e41f4b71Sopenharmony_ci
473e41f4b71Sopenharmony_ci```
474e41f4b71Sopenharmony_citypedef bool(* OH_EffectFilterDelegate_Save) (OH_EffectFilter *filter, char **info)
475e41f4b71Sopenharmony_ci```
476e41f4b71Sopenharmony_ci
477e41f4b71Sopenharmony_ci**Description**
478e41f4b71Sopenharmony_ci
479e41f4b71Sopenharmony_ciDefines a pointer to the callback function for serializing a custom filter. Filters are serialized in JSON format.
480e41f4b71Sopenharmony_ci
481e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
482e41f4b71Sopenharmony_ci
483e41f4b71Sopenharmony_ci**Since**: 12
484e41f4b71Sopenharmony_ci
485e41f4b71Sopenharmony_ci**Parameters**
486e41f4b71Sopenharmony_ci
487e41f4b71Sopenharmony_ci| Name| Description| 
488e41f4b71Sopenharmony_ci| -------- | -------- |
489e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
490e41f4b71Sopenharmony_ci| info | Double pointer to a char array holding a serialized JSON string.| 
491e41f4b71Sopenharmony_ci
492e41f4b71Sopenharmony_ci**Returns**
493e41f4b71Sopenharmony_ci
494e41f4b71Sopenharmony_ciReturns **true** if the operation is successful; returns **false** otherwise.
495e41f4b71Sopenharmony_ci
496e41f4b71Sopenharmony_ci
497e41f4b71Sopenharmony_ci### OH_EffectFilterDelegate_SetValue
498e41f4b71Sopenharmony_ci
499e41f4b71Sopenharmony_ci```
500e41f4b71Sopenharmony_citypedef bool(* OH_EffectFilterDelegate_SetValue) (OH_EffectFilter *filter, const char *key, const ImageEffect_Any *value)
501e41f4b71Sopenharmony_ci```
502e41f4b71Sopenharmony_ci
503e41f4b71Sopenharmony_ci**Description**
504e41f4b71Sopenharmony_ci
505e41f4b71Sopenharmony_ciDefines a pointer to the callback function for setting parameters of a custom filter. It is used to verify parameters and parameter values.
506e41f4b71Sopenharmony_ci
507e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
508e41f4b71Sopenharmony_ci
509e41f4b71Sopenharmony_ci**Since**: 12
510e41f4b71Sopenharmony_ci
511e41f4b71Sopenharmony_ci**Parameters**
512e41f4b71Sopenharmony_ci
513e41f4b71Sopenharmony_ci| Name| Description| 
514e41f4b71Sopenharmony_ci| -------- | -------- |
515e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
516e41f4b71Sopenharmony_ci| key | Pointer to the key of a filter parameter.| 
517e41f4b71Sopenharmony_ci| value | Pointer to the value of the filter parameter.| 
518e41f4b71Sopenharmony_ci
519e41f4b71Sopenharmony_ci**Returns**
520e41f4b71Sopenharmony_ci
521e41f4b71Sopenharmony_ciReturns **true** if the parameter is valid; returns **false** otherwise.
522e41f4b71Sopenharmony_ci
523e41f4b71Sopenharmony_ci
524e41f4b71Sopenharmony_ci### OH_EffectFilterInfo
525e41f4b71Sopenharmony_ci
526e41f4b71Sopenharmony_ci```
527e41f4b71Sopenharmony_citypedef struct OH_EffectFilterInfo OH_EffectFilterInfo
528e41f4b71Sopenharmony_ci```
529e41f4b71Sopenharmony_ci
530e41f4b71Sopenharmony_ci**Description**
531e41f4b71Sopenharmony_ci
532e41f4b71Sopenharmony_ciDefines a struct for the image effect filter information.
533e41f4b71Sopenharmony_ci
534e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
535e41f4b71Sopenharmony_ci
536e41f4b71Sopenharmony_ci**Since**: 12
537e41f4b71Sopenharmony_ci
538e41f4b71Sopenharmony_ci
539e41f4b71Sopenharmony_ci### OH_ImageEffect
540e41f4b71Sopenharmony_ci
541e41f4b71Sopenharmony_ci```
542e41f4b71Sopenharmony_citypedef struct OH_ImageEffect OH_ImageEffect
543e41f4b71Sopenharmony_ci```
544e41f4b71Sopenharmony_ci
545e41f4b71Sopenharmony_ci**Description**
546e41f4b71Sopenharmony_ci
547e41f4b71Sopenharmony_ciDefines a struct for the image effector.
548e41f4b71Sopenharmony_ci
549e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
550e41f4b71Sopenharmony_ci
551e41f4b71Sopenharmony_ci**Since**: 12
552e41f4b71Sopenharmony_ci
553e41f4b71Sopenharmony_ci
554e41f4b71Sopenharmony_ci## Enum Description
555e41f4b71Sopenharmony_ci
556e41f4b71Sopenharmony_ci
557e41f4b71Sopenharmony_ci### ImageEffect_BufferType
558e41f4b71Sopenharmony_ci
559e41f4b71Sopenharmony_ci```
560e41f4b71Sopenharmony_cienum ImageEffect_BufferType
561e41f4b71Sopenharmony_ci```
562e41f4b71Sopenharmony_ci
563e41f4b71Sopenharmony_ci**Description**
564e41f4b71Sopenharmony_ci
565e41f4b71Sopenharmony_ciEnumerates the buffer types.
566e41f4b71Sopenharmony_ci
567e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
568e41f4b71Sopenharmony_ci
569e41f4b71Sopenharmony_ci**Since**: 12
570e41f4b71Sopenharmony_ci
571e41f4b71Sopenharmony_ci| Value| Description| 
572e41f4b71Sopenharmony_ci| -------- | -------- |
573e41f4b71Sopenharmony_ci| EFFECT_BUFFER_TYPE_UNKNOWN | Undefined type.| 
574e41f4b71Sopenharmony_ci| EFFECT_BUFFER_TYPE_PIXEL | Pixel image type.| 
575e41f4b71Sopenharmony_ci| EFFECT_BUFFER_TYPE_TEXTURE | Texture type.| 
576e41f4b71Sopenharmony_ci
577e41f4b71Sopenharmony_ci
578e41f4b71Sopenharmony_ci### ImageEffect_DataType
579e41f4b71Sopenharmony_ci
580e41f4b71Sopenharmony_ci```
581e41f4b71Sopenharmony_cienum ImageEffect_DataType
582e41f4b71Sopenharmony_ci```
583e41f4b71Sopenharmony_ci
584e41f4b71Sopenharmony_ci**Description**
585e41f4b71Sopenharmony_ci
586e41f4b71Sopenharmony_ciEnumerates the data types.
587e41f4b71Sopenharmony_ci
588e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
589e41f4b71Sopenharmony_ci
590e41f4b71Sopenharmony_ci**Since**: 12
591e41f4b71Sopenharmony_ci
592e41f4b71Sopenharmony_ci| Value| Description| 
593e41f4b71Sopenharmony_ci| -------- | -------- |
594e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_UNKNOWN | Undefined type.| 
595e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_INT32 | Integer.| 
596e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_FLOAT | Single-precision floating point.| 
597e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_DOUBLE | Double-precision floating point.| 
598e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_CHAR | Byte.| 
599e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_LONG | Long integer.| 
600e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_BOOL | Boolean.| 
601e41f4b71Sopenharmony_ci| EFFECT_DATA_TYPE_PTR | Pointer.| 
602e41f4b71Sopenharmony_ci
603e41f4b71Sopenharmony_ci
604e41f4b71Sopenharmony_ci### ImageEffect_ErrorCode
605e41f4b71Sopenharmony_ci
606e41f4b71Sopenharmony_ci```
607e41f4b71Sopenharmony_cienum ImageEffect_ErrorCode
608e41f4b71Sopenharmony_ci```
609e41f4b71Sopenharmony_ci
610e41f4b71Sopenharmony_ci**Description**
611e41f4b71Sopenharmony_ci
612e41f4b71Sopenharmony_ciEnumerates the error codes used by the image effector.
613e41f4b71Sopenharmony_ci
614e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
615e41f4b71Sopenharmony_ci
616e41f4b71Sopenharmony_ci**Since**: 12
617e41f4b71Sopenharmony_ci
618e41f4b71Sopenharmony_ci| Value| Description| 
619e41f4b71Sopenharmony_ci| -------- | -------- |
620e41f4b71Sopenharmony_ci| EFFECT_SUCCESS | The operation is successful.| 
621e41f4b71Sopenharmony_ci| EFFECT_ERROR_PERMISSION_DENIED | Permission verification fails.| 
622e41f4b71Sopenharmony_ci| EFFECT_ERROR_PARAM_INVALID | Parameter check fails.| 
623e41f4b71Sopenharmony_ci| EFFECT_BUFFER_SIZE_NOT_MATCH | The output buffer size does not match.| 
624e41f4b71Sopenharmony_ci| EFFECT_COLOR_SPACE_NOT_MATCH | The input and output color spaces do not match.| 
625e41f4b71Sopenharmony_ci| EFFECT_INPUT_OUTPUT_NOT_MATCH | The input and output configurations do not match. For example, the input is a surface, but the output is a pixel map.| 
626e41f4b71Sopenharmony_ci| EFFECT_EFFECT_NUMBER_LIMITED | The maximum number is reached.| 
627e41f4b71Sopenharmony_ci| EFFECT_INPUT_OUTPUT_NOT_SUPPORTED | The input or output configuration is not supported.| 
628e41f4b71Sopenharmony_ci| EFFECT_ALLOCATE_MEMORY_FAILED | Requesting for the buffer fails.| 
629e41f4b71Sopenharmony_ci| EFFECT_PARAM_ERROR | Invalid parameter value. For example, the filter parameter value is invalid.| 
630e41f4b71Sopenharmony_ci| EFFECT_KEY_ERROR | Invalid parameter. For example, the filter parameter is invalid.| 
631e41f4b71Sopenharmony_ci| EFFECT_UNKNOWN | Undefined error.| 
632e41f4b71Sopenharmony_ci
633e41f4b71Sopenharmony_ci
634e41f4b71Sopenharmony_ci### ImageEffect_Format
635e41f4b71Sopenharmony_ci
636e41f4b71Sopenharmony_ci```
637e41f4b71Sopenharmony_cienum ImageEffect_Format
638e41f4b71Sopenharmony_ci```
639e41f4b71Sopenharmony_ci
640e41f4b71Sopenharmony_ci**Description**
641e41f4b71Sopenharmony_ci
642e41f4b71Sopenharmony_ciEnumerates the pixel formats.
643e41f4b71Sopenharmony_ci
644e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
645e41f4b71Sopenharmony_ci
646e41f4b71Sopenharmony_ci**Since**: 12
647e41f4b71Sopenharmony_ci
648e41f4b71Sopenharmony_ci| Value| Description| 
649e41f4b71Sopenharmony_ci| -------- | -------- |
650e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_UNKNOWN | Undefined format.| 
651e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_RGBA8888 | RGBA8888.| 
652e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_NV21 | NV21.| 
653e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_NV12 | NV12.| 
654e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_RGBA1010102 | 10-bit RGBA.| 
655e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_YCBCR_P010 | 10-bit YCBCR420.| 
656e41f4b71Sopenharmony_ci| EFFECT_PIXEL_FORMAT_YCRCB_P010 | 10-bit YCRCB420.| 
657e41f4b71Sopenharmony_ci
658e41f4b71Sopenharmony_ci
659e41f4b71Sopenharmony_ci## Function Description
660e41f4b71Sopenharmony_ci
661e41f4b71Sopenharmony_ci
662e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_Create()
663e41f4b71Sopenharmony_ci
664e41f4b71Sopenharmony_ci```
665e41f4b71Sopenharmony_ciOH_EffectBufferInfo* OH_EffectBufferInfo_Create ()
666e41f4b71Sopenharmony_ci```
667e41f4b71Sopenharmony_ci
668e41f4b71Sopenharmony_ci**Description**
669e41f4b71Sopenharmony_ci
670e41f4b71Sopenharmony_ciCreates an **OH_EffectBufferInfo** instance. The instance must be released by calling [OH_EffectBufferInfo_Release](#oh_effectbufferinfo_release) when it is no longer needed.
671e41f4b71Sopenharmony_ci
672e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
673e41f4b71Sopenharmony_ci
674e41f4b71Sopenharmony_ci**Since**: 12
675e41f4b71Sopenharmony_ci
676e41f4b71Sopenharmony_ci**Returns**
677e41f4b71Sopenharmony_ci
678e41f4b71Sopenharmony_ciReturns the pointer to the **OH_EffectBufferInfo** instance created if the operation is successful; returns a null pointer otherwise.
679e41f4b71Sopenharmony_ci
680e41f4b71Sopenharmony_ci
681e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_GetAddr()
682e41f4b71Sopenharmony_ci
683e41f4b71Sopenharmony_ci```
684e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_GetAddr (OH_EffectBufferInfo * info, void ** addr )
685e41f4b71Sopenharmony_ci```
686e41f4b71Sopenharmony_ci
687e41f4b71Sopenharmony_ci**Description**
688e41f4b71Sopenharmony_ci
689e41f4b71Sopenharmony_ciObtains the address of an effect buffer.
690e41f4b71Sopenharmony_ci
691e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
692e41f4b71Sopenharmony_ci
693e41f4b71Sopenharmony_ci**Since**: 12
694e41f4b71Sopenharmony_ci
695e41f4b71Sopenharmony_ci**Parameters**
696e41f4b71Sopenharmony_ci
697e41f4b71Sopenharmony_ci| Name| Description| 
698e41f4b71Sopenharmony_ci| -------- | -------- |
699e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
700e41f4b71Sopenharmony_ci| addr | Double pointer to the virtual address of the image buffer.| 
701e41f4b71Sopenharmony_ci
702e41f4b71Sopenharmony_ci**Returns**
703e41f4b71Sopenharmony_ci
704e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
705e41f4b71Sopenharmony_ci
706e41f4b71Sopenharmony_ci
707e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_GetEffectFormat()
708e41f4b71Sopenharmony_ci
709e41f4b71Sopenharmony_ci```
710e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_GetEffectFormat (OH_EffectBufferInfo * info, ImageEffect_Format * format )
711e41f4b71Sopenharmony_ci```
712e41f4b71Sopenharmony_ci
713e41f4b71Sopenharmony_ci**Description**
714e41f4b71Sopenharmony_ci
715e41f4b71Sopenharmony_ciObtains the pixel format of an image.
716e41f4b71Sopenharmony_ci
717e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
718e41f4b71Sopenharmony_ci
719e41f4b71Sopenharmony_ci**Since**: 12
720e41f4b71Sopenharmony_ci
721e41f4b71Sopenharmony_ci**Parameters**
722e41f4b71Sopenharmony_ci
723e41f4b71Sopenharmony_ci| Name| Description| 
724e41f4b71Sopenharmony_ci| -------- | -------- |
725e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
726e41f4b71Sopenharmony_ci| format | Pointer to the pixel format, which is [ImageEffect_Format](#imageeffect_format).| 
727e41f4b71Sopenharmony_ci
728e41f4b71Sopenharmony_ci**Returns**
729e41f4b71Sopenharmony_ci
730e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
731e41f4b71Sopenharmony_ci
732e41f4b71Sopenharmony_ci
733e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_GetHeight()
734e41f4b71Sopenharmony_ci
735e41f4b71Sopenharmony_ci```
736e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_GetHeight (OH_EffectBufferInfo * info, int32_t * height )
737e41f4b71Sopenharmony_ci```
738e41f4b71Sopenharmony_ci
739e41f4b71Sopenharmony_ci**Description**
740e41f4b71Sopenharmony_ci
741e41f4b71Sopenharmony_ciObtains the image height.
742e41f4b71Sopenharmony_ci
743e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
744e41f4b71Sopenharmony_ci
745e41f4b71Sopenharmony_ci**Since**: 12
746e41f4b71Sopenharmony_ci
747e41f4b71Sopenharmony_ci**Parameters**
748e41f4b71Sopenharmony_ci
749e41f4b71Sopenharmony_ci| Name| Description| 
750e41f4b71Sopenharmony_ci| -------- | -------- |
751e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
752e41f4b71Sopenharmony_ci| height | Pointer to the image height, in px.| 
753e41f4b71Sopenharmony_ci
754e41f4b71Sopenharmony_ci**Returns**
755e41f4b71Sopenharmony_ci
756e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
757e41f4b71Sopenharmony_ci
758e41f4b71Sopenharmony_ci
759e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_GetRowSize()
760e41f4b71Sopenharmony_ci
761e41f4b71Sopenharmony_ci```
762e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_GetRowSize (OH_EffectBufferInfo * info, int32_t * rowSize )
763e41f4b71Sopenharmony_ci```
764e41f4b71Sopenharmony_ci
765e41f4b71Sopenharmony_ci**Description**
766e41f4b71Sopenharmony_ci
767e41f4b71Sopenharmony_ciObtains the number of bytes per row of an image.
768e41f4b71Sopenharmony_ci
769e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
770e41f4b71Sopenharmony_ci
771e41f4b71Sopenharmony_ci**Since**: 12
772e41f4b71Sopenharmony_ci
773e41f4b71Sopenharmony_ci**Parameters**
774e41f4b71Sopenharmony_ci
775e41f4b71Sopenharmony_ci| Name| Description| 
776e41f4b71Sopenharmony_ci| -------- | -------- |
777e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
778e41f4b71Sopenharmony_ci| rowSize | Pointer to the number of bytes per row, in bytes.| 
779e41f4b71Sopenharmony_ci
780e41f4b71Sopenharmony_ci**Returns**
781e41f4b71Sopenharmony_ci
782e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
783e41f4b71Sopenharmony_ci
784e41f4b71Sopenharmony_ci
785e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_GetWidth()
786e41f4b71Sopenharmony_ci
787e41f4b71Sopenharmony_ci```
788e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_GetWidth (OH_EffectBufferInfo * info, int32_t * width )
789e41f4b71Sopenharmony_ci```
790e41f4b71Sopenharmony_ci
791e41f4b71Sopenharmony_ci**Description**
792e41f4b71Sopenharmony_ci
793e41f4b71Sopenharmony_ciObtains the image width.
794e41f4b71Sopenharmony_ci
795e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
796e41f4b71Sopenharmony_ci
797e41f4b71Sopenharmony_ci**Since**: 12
798e41f4b71Sopenharmony_ci
799e41f4b71Sopenharmony_ci**Parameters**
800e41f4b71Sopenharmony_ci
801e41f4b71Sopenharmony_ci| Name| Description| 
802e41f4b71Sopenharmony_ci| -------- | -------- |
803e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
804e41f4b71Sopenharmony_ci| width | Pointer to the image width, in px.| 
805e41f4b71Sopenharmony_ci
806e41f4b71Sopenharmony_ci**Returns**
807e41f4b71Sopenharmony_ci
808e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
809e41f4b71Sopenharmony_ci
810e41f4b71Sopenharmony_ci
811e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_Release()
812e41f4b71Sopenharmony_ci
813e41f4b71Sopenharmony_ci```
814e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_Release (OH_EffectBufferInfo * info)
815e41f4b71Sopenharmony_ci```
816e41f4b71Sopenharmony_ci
817e41f4b71Sopenharmony_ci**Description**
818e41f4b71Sopenharmony_ci
819e41f4b71Sopenharmony_ciDestroys an **OH_EffectBufferInfo** instance.
820e41f4b71Sopenharmony_ci
821e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
822e41f4b71Sopenharmony_ci
823e41f4b71Sopenharmony_ci**Since**: 12
824e41f4b71Sopenharmony_ci
825e41f4b71Sopenharmony_ci**Parameters**
826e41f4b71Sopenharmony_ci
827e41f4b71Sopenharmony_ci| Name| Description| 
828e41f4b71Sopenharmony_ci| -------- | -------- |
829e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
830e41f4b71Sopenharmony_ci
831e41f4b71Sopenharmony_ci**Returns**
832e41f4b71Sopenharmony_ci
833e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
834e41f4b71Sopenharmony_ci
835e41f4b71Sopenharmony_ci
836e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_SetAddr()
837e41f4b71Sopenharmony_ci
838e41f4b71Sopenharmony_ci```
839e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_SetAddr (OH_EffectBufferInfo * info, void * addr )
840e41f4b71Sopenharmony_ci```
841e41f4b71Sopenharmony_ci
842e41f4b71Sopenharmony_ci**Description**
843e41f4b71Sopenharmony_ci
844e41f4b71Sopenharmony_ciSets the address of an effect buffer.
845e41f4b71Sopenharmony_ci
846e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
847e41f4b71Sopenharmony_ci
848e41f4b71Sopenharmony_ci**Since**: 12
849e41f4b71Sopenharmony_ci
850e41f4b71Sopenharmony_ci**Parameters**
851e41f4b71Sopenharmony_ci
852e41f4b71Sopenharmony_ci| Name| Description| 
853e41f4b71Sopenharmony_ci| -------- | -------- |
854e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
855e41f4b71Sopenharmony_ci| addr | Pointer to the virtual address of the image buffer.| 
856e41f4b71Sopenharmony_ci
857e41f4b71Sopenharmony_ci**Returns**
858e41f4b71Sopenharmony_ci
859e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
860e41f4b71Sopenharmony_ci
861e41f4b71Sopenharmony_ci
862e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_SetEffectFormat()
863e41f4b71Sopenharmony_ci
864e41f4b71Sopenharmony_ci```
865e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_SetEffectFormat (OH_EffectBufferInfo * info, ImageEffect_Format format )
866e41f4b71Sopenharmony_ci```
867e41f4b71Sopenharmony_ci
868e41f4b71Sopenharmony_ci**Description**
869e41f4b71Sopenharmony_ci
870e41f4b71Sopenharmony_ciSets the pixel format for an image.
871e41f4b71Sopenharmony_ci
872e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
873e41f4b71Sopenharmony_ci
874e41f4b71Sopenharmony_ci**Since**: 12
875e41f4b71Sopenharmony_ci
876e41f4b71Sopenharmony_ci**Parameters**
877e41f4b71Sopenharmony_ci
878e41f4b71Sopenharmony_ci| Name| Description| 
879e41f4b71Sopenharmony_ci| -------- | -------- |
880e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
881e41f4b71Sopenharmony_ci| format | Pixel format, which is [ImageEffect_Format](#imageeffect_format).| 
882e41f4b71Sopenharmony_ci
883e41f4b71Sopenharmony_ci**Returns**
884e41f4b71Sopenharmony_ci
885e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
886e41f4b71Sopenharmony_ci
887e41f4b71Sopenharmony_ci
888e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_SetHeight()
889e41f4b71Sopenharmony_ci
890e41f4b71Sopenharmony_ci```
891e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_SetHeight (OH_EffectBufferInfo * info, int32_t height )
892e41f4b71Sopenharmony_ci```
893e41f4b71Sopenharmony_ci
894e41f4b71Sopenharmony_ci**Description**
895e41f4b71Sopenharmony_ci
896e41f4b71Sopenharmony_ciSets the image height.
897e41f4b71Sopenharmony_ci
898e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
899e41f4b71Sopenharmony_ci
900e41f4b71Sopenharmony_ci**Since**: 12
901e41f4b71Sopenharmony_ci
902e41f4b71Sopenharmony_ci**Parameters**
903e41f4b71Sopenharmony_ci
904e41f4b71Sopenharmony_ci| Name| Description| 
905e41f4b71Sopenharmony_ci| -------- | -------- |
906e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
907e41f4b71Sopenharmony_ci| height | Image height, in px.| 
908e41f4b71Sopenharmony_ci
909e41f4b71Sopenharmony_ci**Returns**
910e41f4b71Sopenharmony_ci
911e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
912e41f4b71Sopenharmony_ci
913e41f4b71Sopenharmony_ci
914e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_SetRowSize()
915e41f4b71Sopenharmony_ci
916e41f4b71Sopenharmony_ci```
917e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_SetRowSize (OH_EffectBufferInfo * info, int32_t rowSize )
918e41f4b71Sopenharmony_ci```
919e41f4b71Sopenharmony_ci
920e41f4b71Sopenharmony_ci**Description**
921e41f4b71Sopenharmony_ci
922e41f4b71Sopenharmony_ciSets the number of bytes per row for an image.
923e41f4b71Sopenharmony_ci
924e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
925e41f4b71Sopenharmony_ci
926e41f4b71Sopenharmony_ci**Since**: 12
927e41f4b71Sopenharmony_ci
928e41f4b71Sopenharmony_ci**Parameters**
929e41f4b71Sopenharmony_ci
930e41f4b71Sopenharmony_ci| Name| Description| 
931e41f4b71Sopenharmony_ci| -------- | -------- |
932e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
933e41f4b71Sopenharmony_ci| rowSize | Number of bytes per row, in bytes.| 
934e41f4b71Sopenharmony_ci
935e41f4b71Sopenharmony_ci**Returns**
936e41f4b71Sopenharmony_ci
937e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
938e41f4b71Sopenharmony_ci
939e41f4b71Sopenharmony_ci
940e41f4b71Sopenharmony_ci### OH_EffectBufferInfo_SetWidth()
941e41f4b71Sopenharmony_ci
942e41f4b71Sopenharmony_ci```
943e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectBufferInfo_SetWidth (OH_EffectBufferInfo * info, int32_t width )
944e41f4b71Sopenharmony_ci```
945e41f4b71Sopenharmony_ci
946e41f4b71Sopenharmony_ci**Description**
947e41f4b71Sopenharmony_ci
948e41f4b71Sopenharmony_ciSets the image width.
949e41f4b71Sopenharmony_ci
950e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
951e41f4b71Sopenharmony_ci
952e41f4b71Sopenharmony_ci**Since**: 12
953e41f4b71Sopenharmony_ci
954e41f4b71Sopenharmony_ci**Parameters**
955e41f4b71Sopenharmony_ci
956e41f4b71Sopenharmony_ci| Name| Description| 
957e41f4b71Sopenharmony_ci| -------- | -------- |
958e41f4b71Sopenharmony_ci| info | Pointer to the image information.| 
959e41f4b71Sopenharmony_ci| width | Image width, in px.| 
960e41f4b71Sopenharmony_ci
961e41f4b71Sopenharmony_ci**Returns**
962e41f4b71Sopenharmony_ci
963e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
964e41f4b71Sopenharmony_ci
965e41f4b71Sopenharmony_ci
966e41f4b71Sopenharmony_ci### OH_EffectFilter_Create()
967e41f4b71Sopenharmony_ci
968e41f4b71Sopenharmony_ci```
969e41f4b71Sopenharmony_ciOH_EffectFilter* OH_EffectFilter_Create (const char * name)
970e41f4b71Sopenharmony_ci```
971e41f4b71Sopenharmony_ci
972e41f4b71Sopenharmony_ci**Description**
973e41f4b71Sopenharmony_ci
974e41f4b71Sopenharmony_ciCreates an **OH_EffectFilter** instance. The instance must be released by calling [OH_EffectFilter_Release](#oh_effectfilter_release) when it is no longer needed.
975e41f4b71Sopenharmony_ci
976e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
977e41f4b71Sopenharmony_ci
978e41f4b71Sopenharmony_ci**Since**: 12
979e41f4b71Sopenharmony_ci
980e41f4b71Sopenharmony_ci**Parameters**
981e41f4b71Sopenharmony_ci
982e41f4b71Sopenharmony_ci| Name| Description| 
983e41f4b71Sopenharmony_ci| -------- | -------- |
984e41f4b71Sopenharmony_ci| name | Pointer to the filter name, for example, **OH_EFFECT_BRIGHTNESS_FILTER**.| 
985e41f4b71Sopenharmony_ci
986e41f4b71Sopenharmony_ci**Returns**
987e41f4b71Sopenharmony_ci
988e41f4b71Sopenharmony_ciReturns the pointer to the **OH_EffectFilter** instance created if the operation is successful; returns a null pointer otherwise.
989e41f4b71Sopenharmony_ci
990e41f4b71Sopenharmony_ci
991e41f4b71Sopenharmony_ci### OH_EffectFilter_GetValue()
992e41f4b71Sopenharmony_ci
993e41f4b71Sopenharmony_ci```
994e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilter_GetValue (OH_EffectFilter * filter, const char * key, ImageEffect_Any * value )
995e41f4b71Sopenharmony_ci```
996e41f4b71Sopenharmony_ci
997e41f4b71Sopenharmony_ci**Description**
998e41f4b71Sopenharmony_ci
999e41f4b71Sopenharmony_ciObtains a filter parameter.
1000e41f4b71Sopenharmony_ci
1001e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1002e41f4b71Sopenharmony_ci
1003e41f4b71Sopenharmony_ci**Since**: 12
1004e41f4b71Sopenharmony_ci
1005e41f4b71Sopenharmony_ci**Parameters**
1006e41f4b71Sopenharmony_ci
1007e41f4b71Sopenharmony_ci| Name| Description| 
1008e41f4b71Sopenharmony_ci| -------- | -------- |
1009e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
1010e41f4b71Sopenharmony_ci| key | Pointer to the key of the filter parameter, for example, **OH_EFFECT_FILTER_INTENSITY_KEY**.| 
1011e41f4b71Sopenharmony_ci| value | Pointer to the value of the filter parameter.| 
1012e41f4b71Sopenharmony_ci
1013e41f4b71Sopenharmony_ci**Returns**
1014e41f4b71Sopenharmony_ci
1015e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer; returns **EFFECT_KEY_ERROR** if the key of the filter parameter is invalid.
1016e41f4b71Sopenharmony_ci
1017e41f4b71Sopenharmony_ci
1018e41f4b71Sopenharmony_ci### OH_EffectFilter_LookupFilterInfo()
1019e41f4b71Sopenharmony_ci
1020e41f4b71Sopenharmony_ci```
1021e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilter_LookupFilterInfo (const char * name, OH_EffectFilterInfo * info )
1022e41f4b71Sopenharmony_ci```
1023e41f4b71Sopenharmony_ci
1024e41f4b71Sopenharmony_ci**Description**
1025e41f4b71Sopenharmony_ci
1026e41f4b71Sopenharmony_ciObtains the filter information.
1027e41f4b71Sopenharmony_ci
1028e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1029e41f4b71Sopenharmony_ci
1030e41f4b71Sopenharmony_ci**Since**: 12
1031e41f4b71Sopenharmony_ci
1032e41f4b71Sopenharmony_ci**Parameters**
1033e41f4b71Sopenharmony_ci
1034e41f4b71Sopenharmony_ci| Name| Description| 
1035e41f4b71Sopenharmony_ci| -------- | -------- |
1036e41f4b71Sopenharmony_ci| name | Pointer to the filter name.| 
1037e41f4b71Sopenharmony_ci| info | Pointer to the filter information, which is [OH_EffectFilterInfo](#oh_effectfilterinfo).| 
1038e41f4b71Sopenharmony_ci
1039e41f4b71Sopenharmony_ci**Returns**
1040e41f4b71Sopenharmony_ci
1041e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer or an invalid value.
1042e41f4b71Sopenharmony_ci
1043e41f4b71Sopenharmony_ci
1044e41f4b71Sopenharmony_ci### OH_EffectFilter_LookupFilters()
1045e41f4b71Sopenharmony_ci
1046e41f4b71Sopenharmony_ci```
1047e41f4b71Sopenharmony_ciImageEffect_FilterNames* OH_EffectFilter_LookupFilters (const char * key)
1048e41f4b71Sopenharmony_ci```
1049e41f4b71Sopenharmony_ci
1050e41f4b71Sopenharmony_ci**Description**
1051e41f4b71Sopenharmony_ci
1052e41f4b71Sopenharmony_ciObtains filters that meet given conditions.
1053e41f4b71Sopenharmony_ci
1054e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1055e41f4b71Sopenharmony_ci
1056e41f4b71Sopenharmony_ci**Since**: 12
1057e41f4b71Sopenharmony_ci
1058e41f4b71Sopenharmony_ci**Parameters**
1059e41f4b71Sopenharmony_ci
1060e41f4b71Sopenharmony_ci| Name| Description| 
1061e41f4b71Sopenharmony_ci| -------- | -------- |
1062e41f4b71Sopenharmony_ci| key | Pointer to the conditions. You can use the keyword **Default** to obtain all filters.| 
1063e41f4b71Sopenharmony_ci
1064e41f4b71Sopenharmony_ci**Returns**
1065e41f4b71Sopenharmony_ci
1066e41f4b71Sopenharmony_ciReturns a list of filter names, which is [ImageEffect_FilterNames](_image_effect___filter_names.md).
1067e41f4b71Sopenharmony_ci
1068e41f4b71Sopenharmony_ci
1069e41f4b71Sopenharmony_ci### OH_EffectFilter_Register()
1070e41f4b71Sopenharmony_ci
1071e41f4b71Sopenharmony_ci```
1072e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilter_Register (const OH_EffectFilterInfo * info, const ImageEffect_FilterDelegate * delegate )
1073e41f4b71Sopenharmony_ci```
1074e41f4b71Sopenharmony_ci
1075e41f4b71Sopenharmony_ci**Description**
1076e41f4b71Sopenharmony_ci
1077e41f4b71Sopenharmony_ciRegisters a custom filter.
1078e41f4b71Sopenharmony_ci
1079e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1080e41f4b71Sopenharmony_ci
1081e41f4b71Sopenharmony_ci**Since**: 12
1082e41f4b71Sopenharmony_ci
1083e41f4b71Sopenharmony_ci**Parameters**
1084e41f4b71Sopenharmony_ci
1085e41f4b71Sopenharmony_ci| Name| Description| 
1086e41f4b71Sopenharmony_ci| -------- | -------- |
1087e41f4b71Sopenharmony_ci| info | Pointer to the filter information, which is [OH_EffectFilterInfo](#oh_effectfilterinfo).| 
1088e41f4b71Sopenharmony_ci| delegate | Pointer to the callback function [ImageEffect_FilterDelegate](_image_effect___filter_delegate.md) of the filter.| 
1089e41f4b71Sopenharmony_ci
1090e41f4b71Sopenharmony_ci**Returns**
1091e41f4b71Sopenharmony_ci
1092e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1093e41f4b71Sopenharmony_ci
1094e41f4b71Sopenharmony_ci
1095e41f4b71Sopenharmony_ci### OH_EffectFilter_Release()
1096e41f4b71Sopenharmony_ci
1097e41f4b71Sopenharmony_ci```
1098e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilter_Release (OH_EffectFilter * filter)
1099e41f4b71Sopenharmony_ci```
1100e41f4b71Sopenharmony_ci
1101e41f4b71Sopenharmony_ci**Description**
1102e41f4b71Sopenharmony_ci
1103e41f4b71Sopenharmony_ciDestroys an **OH_EffectFilter** instance.
1104e41f4b71Sopenharmony_ci
1105e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1106e41f4b71Sopenharmony_ci
1107e41f4b71Sopenharmony_ci**Since**: 12
1108e41f4b71Sopenharmony_ci
1109e41f4b71Sopenharmony_ci**Parameters**
1110e41f4b71Sopenharmony_ci
1111e41f4b71Sopenharmony_ci| Name| Description| 
1112e41f4b71Sopenharmony_ci| -------- | -------- |
1113e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
1114e41f4b71Sopenharmony_ci
1115e41f4b71Sopenharmony_ci**Returns**
1116e41f4b71Sopenharmony_ci
1117e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1118e41f4b71Sopenharmony_ci
1119e41f4b71Sopenharmony_ci
1120e41f4b71Sopenharmony_ci### OH_EffectFilter_ReleaseFilterNames()
1121e41f4b71Sopenharmony_ci
1122e41f4b71Sopenharmony_ci```
1123e41f4b71Sopenharmony_civoid OH_EffectFilter_ReleaseFilterNames ()
1124e41f4b71Sopenharmony_ci```
1125e41f4b71Sopenharmony_ci
1126e41f4b71Sopenharmony_ci**Description**
1127e41f4b71Sopenharmony_ci
1128e41f4b71Sopenharmony_ciReleases filter name memory resources.
1129e41f4b71Sopenharmony_ci
1130e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1131e41f4b71Sopenharmony_ci
1132e41f4b71Sopenharmony_ci**Since**: 12
1133e41f4b71Sopenharmony_ci
1134e41f4b71Sopenharmony_ci
1135e41f4b71Sopenharmony_ci### OH_EffectFilter_Render()
1136e41f4b71Sopenharmony_ci
1137e41f4b71Sopenharmony_ci```
1138e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilter_Render (OH_EffectFilter * filter, OH_PixelmapNative * inputPixelmap, OH_PixelmapNative * outputPixelmap )
1139e41f4b71Sopenharmony_ci```
1140e41f4b71Sopenharmony_ci
1141e41f4b71Sopenharmony_ci**Description**
1142e41f4b71Sopenharmony_ci
1143e41f4b71Sopenharmony_ciStarts image rendering.
1144e41f4b71Sopenharmony_ci
1145e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1146e41f4b71Sopenharmony_ci
1147e41f4b71Sopenharmony_ci**Since**: 12
1148e41f4b71Sopenharmony_ci
1149e41f4b71Sopenharmony_ci**Parameters**
1150e41f4b71Sopenharmony_ci
1151e41f4b71Sopenharmony_ci| Name| Description| 
1152e41f4b71Sopenharmony_ci| -------- | -------- |
1153e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
1154e41f4b71Sopenharmony_ci| inputPixelmap | Pointer to the input image.| 
1155e41f4b71Sopenharmony_ci| outputPixelmap | Pointer to the output image.| 
1156e41f4b71Sopenharmony_ci
1157e41f4b71Sopenharmony_ci**Returns**
1158e41f4b71Sopenharmony_ci
1159e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1160e41f4b71Sopenharmony_ci
1161e41f4b71Sopenharmony_ci
1162e41f4b71Sopenharmony_ci### OH_EffectFilter_SetValue()
1163e41f4b71Sopenharmony_ci
1164e41f4b71Sopenharmony_ci```
1165e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilter_SetValue (OH_EffectFilter * filter, const char * key, const ImageEffect_Any * value )
1166e41f4b71Sopenharmony_ci```
1167e41f4b71Sopenharmony_ci
1168e41f4b71Sopenharmony_ci**Description**
1169e41f4b71Sopenharmony_ci
1170e41f4b71Sopenharmony_ciSets a filter parameter.
1171e41f4b71Sopenharmony_ci
1172e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1173e41f4b71Sopenharmony_ci
1174e41f4b71Sopenharmony_ci**Since**: 12
1175e41f4b71Sopenharmony_ci
1176e41f4b71Sopenharmony_ci**Parameters**
1177e41f4b71Sopenharmony_ci
1178e41f4b71Sopenharmony_ci| Name| Description| 
1179e41f4b71Sopenharmony_ci| -------- | -------- |
1180e41f4b71Sopenharmony_ci| filter | Pointer to the filter.| 
1181e41f4b71Sopenharmony_ci| key | Pointer to the key of the filter parameter, for example, **OH_EFFECT_FILTER_INTENSITY_KEY**.| 
1182e41f4b71Sopenharmony_ci| value | Pointer to the value of the filter parameter.| 
1183e41f4b71Sopenharmony_ci
1184e41f4b71Sopenharmony_ci**Returns**
1185e41f4b71Sopenharmony_ci
1186e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer; returns **EFFECT_KEY_ERROR** if the key of the filter parameter is invalid; returns **EFFECT_PARAM_ERROR** if the value of the filter parameter is invalid.
1187e41f4b71Sopenharmony_ci
1188e41f4b71Sopenharmony_ci
1189e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_Create()
1190e41f4b71Sopenharmony_ci
1191e41f4b71Sopenharmony_ci```
1192e41f4b71Sopenharmony_ciOH_EffectFilterInfo* OH_EffectFilterInfo_Create ()
1193e41f4b71Sopenharmony_ci```
1194e41f4b71Sopenharmony_ci
1195e41f4b71Sopenharmony_ci**Description**
1196e41f4b71Sopenharmony_ci
1197e41f4b71Sopenharmony_ciCreates an **OH_EffectFilterInfo** instance. The instance must be released by calling [OH_EffectFilterInfo_Release](#oh_effectfilterinfo_release) when it is no longer needed.
1198e41f4b71Sopenharmony_ci
1199e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1200e41f4b71Sopenharmony_ci
1201e41f4b71Sopenharmony_ci**Since**: 12
1202e41f4b71Sopenharmony_ci
1203e41f4b71Sopenharmony_ci**Returns**
1204e41f4b71Sopenharmony_ci
1205e41f4b71Sopenharmony_ciReturns the pointer to the **OH_EffectFilterInfo** instance created if the operation is successful; returns a null pointer otherwise.
1206e41f4b71Sopenharmony_ci
1207e41f4b71Sopenharmony_ci
1208e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_GetFilterName()
1209e41f4b71Sopenharmony_ci
1210e41f4b71Sopenharmony_ci```
1211e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_GetFilterName (OH_EffectFilterInfo * info, char ** name )
1212e41f4b71Sopenharmony_ci```
1213e41f4b71Sopenharmony_ci
1214e41f4b71Sopenharmony_ci**Description**
1215e41f4b71Sopenharmony_ci
1216e41f4b71Sopenharmony_ciObtains a filter name.
1217e41f4b71Sopenharmony_ci
1218e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1219e41f4b71Sopenharmony_ci
1220e41f4b71Sopenharmony_ci**Since**: 12
1221e41f4b71Sopenharmony_ci
1222e41f4b71Sopenharmony_ci**Parameters**
1223e41f4b71Sopenharmony_ci
1224e41f4b71Sopenharmony_ci| Name| Description| 
1225e41f4b71Sopenharmony_ci| -------- | -------- |
1226e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1227e41f4b71Sopenharmony_ci| name | Double pointer to the char array holding the filter name.| 
1228e41f4b71Sopenharmony_ci
1229e41f4b71Sopenharmony_ci**Returns**
1230e41f4b71Sopenharmony_ci
1231e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1232e41f4b71Sopenharmony_ci
1233e41f4b71Sopenharmony_ci
1234e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_GetSupportedBufferTypes()
1235e41f4b71Sopenharmony_ci
1236e41f4b71Sopenharmony_ci```
1237e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedBufferTypes (OH_EffectFilterInfo * info, uint32_t * size, ImageEffect_BufferType ** bufferTypeArray )
1238e41f4b71Sopenharmony_ci```
1239e41f4b71Sopenharmony_ci
1240e41f4b71Sopenharmony_ci**Description**
1241e41f4b71Sopenharmony_ci
1242e41f4b71Sopenharmony_ciObtains the buffer types supported by a filter.
1243e41f4b71Sopenharmony_ci
1244e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1245e41f4b71Sopenharmony_ci
1246e41f4b71Sopenharmony_ci**Since**: 12
1247e41f4b71Sopenharmony_ci
1248e41f4b71Sopenharmony_ci**Parameters**
1249e41f4b71Sopenharmony_ci
1250e41f4b71Sopenharmony_ci| Name| Description| 
1251e41f4b71Sopenharmony_ci| -------- | -------- |
1252e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1253e41f4b71Sopenharmony_ci| size | Pointer to the number of buffer types supported, each of which is [ImageEffect_BufferType](#imageeffect_buffertype).| 
1254e41f4b71Sopenharmony_ci| bufferTypeArray | Double pointer to the array holding the buffer types supported, each of which is [ImageEffect_BufferType](#imageeffect_buffertype).| 
1255e41f4b71Sopenharmony_ci
1256e41f4b71Sopenharmony_ci**Returns**
1257e41f4b71Sopenharmony_ci
1258e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1259e41f4b71Sopenharmony_ci
1260e41f4b71Sopenharmony_ci
1261e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_GetSupportedFormats()
1262e41f4b71Sopenharmony_ci
1263e41f4b71Sopenharmony_ci```
1264e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedFormats (OH_EffectFilterInfo * info, uint32_t * size, ImageEffect_Format ** formatArray )
1265e41f4b71Sopenharmony_ci```
1266e41f4b71Sopenharmony_ci
1267e41f4b71Sopenharmony_ci**Description**
1268e41f4b71Sopenharmony_ci
1269e41f4b71Sopenharmony_ciObtains the pixel formats supported by a filter.
1270e41f4b71Sopenharmony_ci
1271e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1272e41f4b71Sopenharmony_ci
1273e41f4b71Sopenharmony_ci**Since**: 12
1274e41f4b71Sopenharmony_ci
1275e41f4b71Sopenharmony_ci**Parameters**
1276e41f4b71Sopenharmony_ci
1277e41f4b71Sopenharmony_ci| Name| Description| 
1278e41f4b71Sopenharmony_ci| -------- | -------- |
1279e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1280e41f4b71Sopenharmony_ci| size | Pointer to the number of pixel formats supported, each of which is [ImageEffect_Format](#imageeffect_format).| 
1281e41f4b71Sopenharmony_ci| formatArray | Double pointer to the array holding the pixel formats supported, each of which is [ImageEffect_Format](#imageeffect_format).| 
1282e41f4b71Sopenharmony_ci
1283e41f4b71Sopenharmony_ci**Returns**
1284e41f4b71Sopenharmony_ci
1285e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1286e41f4b71Sopenharmony_ci
1287e41f4b71Sopenharmony_ci
1288e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_Release()
1289e41f4b71Sopenharmony_ci
1290e41f4b71Sopenharmony_ci```
1291e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_Release (OH_EffectFilterInfo * info)
1292e41f4b71Sopenharmony_ci```
1293e41f4b71Sopenharmony_ci
1294e41f4b71Sopenharmony_ci**Description**
1295e41f4b71Sopenharmony_ci
1296e41f4b71Sopenharmony_ciDestroys an **OH_EffectFilterInfo** instance.
1297e41f4b71Sopenharmony_ci
1298e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1299e41f4b71Sopenharmony_ci
1300e41f4b71Sopenharmony_ci**Since**: 12
1301e41f4b71Sopenharmony_ci
1302e41f4b71Sopenharmony_ci**Parameters**
1303e41f4b71Sopenharmony_ci
1304e41f4b71Sopenharmony_ci| Name| Description| 
1305e41f4b71Sopenharmony_ci| -------- | -------- |
1306e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1307e41f4b71Sopenharmony_ci
1308e41f4b71Sopenharmony_ci**Returns**
1309e41f4b71Sopenharmony_ci
1310e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1311e41f4b71Sopenharmony_ci
1312e41f4b71Sopenharmony_ci
1313e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_SetFilterName()
1314e41f4b71Sopenharmony_ci
1315e41f4b71Sopenharmony_ci```
1316e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_SetFilterName (OH_EffectFilterInfo * info, const char * name )
1317e41f4b71Sopenharmony_ci```
1318e41f4b71Sopenharmony_ci
1319e41f4b71Sopenharmony_ci**Description**
1320e41f4b71Sopenharmony_ci
1321e41f4b71Sopenharmony_ciSets a filter name.
1322e41f4b71Sopenharmony_ci
1323e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1324e41f4b71Sopenharmony_ci
1325e41f4b71Sopenharmony_ci**Since**: 12
1326e41f4b71Sopenharmony_ci
1327e41f4b71Sopenharmony_ci**Parameters**
1328e41f4b71Sopenharmony_ci
1329e41f4b71Sopenharmony_ci| Name| Description| 
1330e41f4b71Sopenharmony_ci| -------- | -------- |
1331e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1332e41f4b71Sopenharmony_ci| name | Pointer to the filter name, for example, **OH_EFFECT_BRIGHTNESS_FILTER**.| 
1333e41f4b71Sopenharmony_ci
1334e41f4b71Sopenharmony_ci**Returns**
1335e41f4b71Sopenharmony_ci
1336e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1337e41f4b71Sopenharmony_ci
1338e41f4b71Sopenharmony_ci
1339e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_SetSupportedBufferTypes()
1340e41f4b71Sopenharmony_ci
1341e41f4b71Sopenharmony_ci```
1342e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedBufferTypes (OH_EffectFilterInfo * info, uint32_t size, ImageEffect_BufferType * bufferTypeArray )
1343e41f4b71Sopenharmony_ci```
1344e41f4b71Sopenharmony_ci
1345e41f4b71Sopenharmony_ci**Description**
1346e41f4b71Sopenharmony_ci
1347e41f4b71Sopenharmony_ciSets the buffer types supported by a filter.
1348e41f4b71Sopenharmony_ci
1349e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1350e41f4b71Sopenharmony_ci
1351e41f4b71Sopenharmony_ci**Since**: 12
1352e41f4b71Sopenharmony_ci
1353e41f4b71Sopenharmony_ci**Parameters**
1354e41f4b71Sopenharmony_ci
1355e41f4b71Sopenharmony_ci| Name| Description| 
1356e41f4b71Sopenharmony_ci| -------- | -------- |
1357e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1358e41f4b71Sopenharmony_ci| size | Number of buffer types supported, each of which is [ImageEffect_BufferType](#imageeffect_buffertype).| 
1359e41f4b71Sopenharmony_ci| bufferTypeArray | Pointer to the array holding the buffer types supported, each of which is [ImageEffect_BufferType](#imageeffect_buffertype).| 
1360e41f4b71Sopenharmony_ci
1361e41f4b71Sopenharmony_ci**Returns**
1362e41f4b71Sopenharmony_ci
1363e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1364e41f4b71Sopenharmony_ci
1365e41f4b71Sopenharmony_ci
1366e41f4b71Sopenharmony_ci### OH_EffectFilterInfo_SetSupportedFormats()
1367e41f4b71Sopenharmony_ci
1368e41f4b71Sopenharmony_ci```
1369e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedFormats (OH_EffectFilterInfo * info, uint32_t size, ImageEffect_Format * formatArray )
1370e41f4b71Sopenharmony_ci```
1371e41f4b71Sopenharmony_ci
1372e41f4b71Sopenharmony_ci**Description**
1373e41f4b71Sopenharmony_ci
1374e41f4b71Sopenharmony_ciSets the pixel formats supported by a filter.
1375e41f4b71Sopenharmony_ci
1376e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1377e41f4b71Sopenharmony_ci
1378e41f4b71Sopenharmony_ci**Since**: 12
1379e41f4b71Sopenharmony_ci
1380e41f4b71Sopenharmony_ci**Parameters**
1381e41f4b71Sopenharmony_ci
1382e41f4b71Sopenharmony_ci| Name| Description| 
1383e41f4b71Sopenharmony_ci| -------- | -------- |
1384e41f4b71Sopenharmony_ci| info | Pointer to the filter information.| 
1385e41f4b71Sopenharmony_ci| size | Number of pixel formats supported, each of which is [ImageEffect_Format](#imageeffect_format).| 
1386e41f4b71Sopenharmony_ci| formatArray | Pointer to the array holding the pixel formats supported, each of which is [ImageEffect_Format](#imageeffect_format).| 
1387e41f4b71Sopenharmony_ci
1388e41f4b71Sopenharmony_ci**Returns**
1389e41f4b71Sopenharmony_ci
1390e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1391e41f4b71Sopenharmony_ci
1392e41f4b71Sopenharmony_ci
1393e41f4b71Sopenharmony_ci### OH_ImageEffect_AddFilter()
1394e41f4b71Sopenharmony_ci
1395e41f4b71Sopenharmony_ci```
1396e41f4b71Sopenharmony_ciOH_EffectFilter* OH_ImageEffect_AddFilter (OH_ImageEffect * imageEffect, const char * filterName )
1397e41f4b71Sopenharmony_ci```
1398e41f4b71Sopenharmony_ci
1399e41f4b71Sopenharmony_ci**Description**
1400e41f4b71Sopenharmony_ci
1401e41f4b71Sopenharmony_ciAdds a filter.
1402e41f4b71Sopenharmony_ci
1403e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1404e41f4b71Sopenharmony_ci
1405e41f4b71Sopenharmony_ci**Since**: 12
1406e41f4b71Sopenharmony_ci
1407e41f4b71Sopenharmony_ci**Parameters**
1408e41f4b71Sopenharmony_ci
1409e41f4b71Sopenharmony_ci| Name| Description| 
1410e41f4b71Sopenharmony_ci| -------- | -------- |
1411e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1412e41f4b71Sopenharmony_ci| filterName | Pointer to the filter name.| 
1413e41f4b71Sopenharmony_ci
1414e41f4b71Sopenharmony_ci**Returns**
1415e41f4b71Sopenharmony_ci
1416e41f4b71Sopenharmony_ciReturns the pointer to the **OH_EffectFilter** instance created if the operation is successful; returns a null pointer if the effector is invalid.
1417e41f4b71Sopenharmony_ci
1418e41f4b71Sopenharmony_ci
1419e41f4b71Sopenharmony_ci### OH_ImageEffect_Configure()
1420e41f4b71Sopenharmony_ci
1421e41f4b71Sopenharmony_ci```
1422e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_Configure (OH_ImageEffect * imageEffect, const char * key, const ImageEffect_Any * value )
1423e41f4b71Sopenharmony_ci```
1424e41f4b71Sopenharmony_ci
1425e41f4b71Sopenharmony_ci**Description**
1426e41f4b71Sopenharmony_ci
1427e41f4b71Sopenharmony_ciConfigures an image effector.
1428e41f4b71Sopenharmony_ci
1429e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1430e41f4b71Sopenharmony_ci
1431e41f4b71Sopenharmony_ci**Since**: 12
1432e41f4b71Sopenharmony_ci
1433e41f4b71Sopenharmony_ci**Parameters**
1434e41f4b71Sopenharmony_ci
1435e41f4b71Sopenharmony_ci| Name| Description| 
1436e41f4b71Sopenharmony_ci| -------- | -------- |
1437e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1438e41f4b71Sopenharmony_ci| key | Pointer to the key of a configuration parameter.| 
1439e41f4b71Sopenharmony_ci| value | Pointer to the value of a configuration parameter.| 
1440e41f4b71Sopenharmony_ci
1441e41f4b71Sopenharmony_ci**Returns**
1442e41f4b71Sopenharmony_ci
1443e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer. returns **EFFECT_KEY_ERROR** if the key of the configuration parameter is invalid; returns **EFFECT_PARAM_ERROR** if the value of the configuration parameter is invalid.
1444e41f4b71Sopenharmony_ci
1445e41f4b71Sopenharmony_ci
1446e41f4b71Sopenharmony_ci### OH_ImageEffect_Create()
1447e41f4b71Sopenharmony_ci
1448e41f4b71Sopenharmony_ci```
1449e41f4b71Sopenharmony_ciOH_ImageEffect* OH_ImageEffect_Create (const char * name)
1450e41f4b71Sopenharmony_ci```
1451e41f4b71Sopenharmony_ci
1452e41f4b71Sopenharmony_ci**Description**
1453e41f4b71Sopenharmony_ci
1454e41f4b71Sopenharmony_ciCreates an **OH_ImageEffect** instance. The instance must be released by calling [OH_ImageEffect_Release](#oh_imageeffect_release) when it is no longer needed.
1455e41f4b71Sopenharmony_ci
1456e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1457e41f4b71Sopenharmony_ci
1458e41f4b71Sopenharmony_ci**Since**: 12
1459e41f4b71Sopenharmony_ci
1460e41f4b71Sopenharmony_ci**Parameters**
1461e41f4b71Sopenharmony_ci
1462e41f4b71Sopenharmony_ci| Name| Description| 
1463e41f4b71Sopenharmony_ci| -------- | -------- |
1464e41f4b71Sopenharmony_ci| name | Pointer to the image effector name, which is used to identify the effector. The value can be customized but cannot be empty.| 
1465e41f4b71Sopenharmony_ci
1466e41f4b71Sopenharmony_ci**Returns**
1467e41f4b71Sopenharmony_ci
1468e41f4b71Sopenharmony_ciReturns the pointer to the **OH_ImageEffect** instance created if the operation is successful; returns a null pointer otherwise.
1469e41f4b71Sopenharmony_ci
1470e41f4b71Sopenharmony_ci
1471e41f4b71Sopenharmony_ci### OH_ImageEffect_GetFilter()
1472e41f4b71Sopenharmony_ci
1473e41f4b71Sopenharmony_ci```
1474e41f4b71Sopenharmony_ciOH_EffectFilter* OH_ImageEffect_GetFilter (OH_ImageEffect * imageEffect, uint32_t index )
1475e41f4b71Sopenharmony_ci```
1476e41f4b71Sopenharmony_ci
1477e41f4b71Sopenharmony_ci**Description**
1478e41f4b71Sopenharmony_ci
1479e41f4b71Sopenharmony_ciObtains the information about a filter.
1480e41f4b71Sopenharmony_ci
1481e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1482e41f4b71Sopenharmony_ci
1483e41f4b71Sopenharmony_ci**Since**: 12
1484e41f4b71Sopenharmony_ci
1485e41f4b71Sopenharmony_ci**Parameters**
1486e41f4b71Sopenharmony_ci
1487e41f4b71Sopenharmony_ci| Name| Description| 
1488e41f4b71Sopenharmony_ci| -------- | -------- |
1489e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1490e41f4b71Sopenharmony_ci| index | Index of the filter.| 
1491e41f4b71Sopenharmony_ci
1492e41f4b71Sopenharmony_ci**Returns**
1493e41f4b71Sopenharmony_ci
1494e41f4b71Sopenharmony_ciReturns the pointer to the **OH_EffectFilter** instance created if the operation is successful; returns a null pointer if an input parameter is invalid.
1495e41f4b71Sopenharmony_ci
1496e41f4b71Sopenharmony_ci
1497e41f4b71Sopenharmony_ci### OH_ImageEffect_GetFilterCount()
1498e41f4b71Sopenharmony_ci
1499e41f4b71Sopenharmony_ci```
1500e41f4b71Sopenharmony_ciint32_t OH_ImageEffect_GetFilterCount (OH_ImageEffect * imageEffect)
1501e41f4b71Sopenharmony_ci```
1502e41f4b71Sopenharmony_ci
1503e41f4b71Sopenharmony_ci**Description**
1504e41f4b71Sopenharmony_ci
1505e41f4b71Sopenharmony_ciObtains the number of added filters.
1506e41f4b71Sopenharmony_ci
1507e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1508e41f4b71Sopenharmony_ci
1509e41f4b71Sopenharmony_ci**Since**: 12
1510e41f4b71Sopenharmony_ci
1511e41f4b71Sopenharmony_ci**Parameters**
1512e41f4b71Sopenharmony_ci
1513e41f4b71Sopenharmony_ci| Name| Description| 
1514e41f4b71Sopenharmony_ci| -------- | -------- |
1515e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1516e41f4b71Sopenharmony_ci
1517e41f4b71Sopenharmony_ci**Returns**
1518e41f4b71Sopenharmony_ci
1519e41f4b71Sopenharmony_ciReturns the number of filters.
1520e41f4b71Sopenharmony_ci
1521e41f4b71Sopenharmony_ci
1522e41f4b71Sopenharmony_ci### OH_ImageEffect_GetInputSurface()
1523e41f4b71Sopenharmony_ci
1524e41f4b71Sopenharmony_ci```
1525e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_GetInputSurface (OH_ImageEffect * imageEffect, OHNativeWindow ** nativeWindow )
1526e41f4b71Sopenharmony_ci```
1527e41f4b71Sopenharmony_ci
1528e41f4b71Sopenharmony_ci**Description**
1529e41f4b71Sopenharmony_ci
1530e41f4b71Sopenharmony_ciObtains an input surface.
1531e41f4b71Sopenharmony_ci
1532e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1533e41f4b71Sopenharmony_ci
1534e41f4b71Sopenharmony_ci**Since**: 12
1535e41f4b71Sopenharmony_ci
1536e41f4b71Sopenharmony_ci**Parameters**
1537e41f4b71Sopenharmony_ci
1538e41f4b71Sopenharmony_ci| Name| Description| 
1539e41f4b71Sopenharmony_ci| -------- | -------- |
1540e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1541e41f4b71Sopenharmony_ci| nativeWindow | Double pointer to the **OHNativeWindow** instance.| 
1542e41f4b71Sopenharmony_ci
1543e41f4b71Sopenharmony_ci**Returns**
1544e41f4b71Sopenharmony_ci
1545e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1546e41f4b71Sopenharmony_ci
1547e41f4b71Sopenharmony_ci
1548e41f4b71Sopenharmony_ci### OH_ImageEffect_InsertFilter()
1549e41f4b71Sopenharmony_ci
1550e41f4b71Sopenharmony_ci```
1551e41f4b71Sopenharmony_ciOH_EffectFilter* OH_ImageEffect_InsertFilter (OH_ImageEffect * imageEffect, uint32_t index, const char * filterName )
1552e41f4b71Sopenharmony_ci```
1553e41f4b71Sopenharmony_ci
1554e41f4b71Sopenharmony_ci**Description**
1555e41f4b71Sopenharmony_ci
1556e41f4b71Sopenharmony_ciInserts a filter.
1557e41f4b71Sopenharmony_ci
1558e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1559e41f4b71Sopenharmony_ci
1560e41f4b71Sopenharmony_ci**Since**: 12
1561e41f4b71Sopenharmony_ci
1562e41f4b71Sopenharmony_ci**Parameters**
1563e41f4b71Sopenharmony_ci
1564e41f4b71Sopenharmony_ci| Name| Description| 
1565e41f4b71Sopenharmony_ci| -------- | -------- |
1566e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1567e41f4b71Sopenharmony_ci| index | Index of the filter.| 
1568e41f4b71Sopenharmony_ci| filterName | Pointer to the filter name.| 
1569e41f4b71Sopenharmony_ci
1570e41f4b71Sopenharmony_ci**Returns**
1571e41f4b71Sopenharmony_ci
1572e41f4b71Sopenharmony_ciReturns the pointer to the **OH_EffectFilter** instance created if the operation is successful; returns a null pointer if an input parameter is invalid.
1573e41f4b71Sopenharmony_ci
1574e41f4b71Sopenharmony_ci
1575e41f4b71Sopenharmony_ci### OH_ImageEffect_Release()
1576e41f4b71Sopenharmony_ci
1577e41f4b71Sopenharmony_ci```
1578e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_Release (OH_ImageEffect * imageEffect)
1579e41f4b71Sopenharmony_ci```
1580e41f4b71Sopenharmony_ci
1581e41f4b71Sopenharmony_ci**Description**
1582e41f4b71Sopenharmony_ci
1583e41f4b71Sopenharmony_ciReleases an **OH_ImageEffect** instance.
1584e41f4b71Sopenharmony_ci
1585e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1586e41f4b71Sopenharmony_ci
1587e41f4b71Sopenharmony_ci**Since**: 12
1588e41f4b71Sopenharmony_ci
1589e41f4b71Sopenharmony_ci**Parameters**
1590e41f4b71Sopenharmony_ci
1591e41f4b71Sopenharmony_ci| Name| Description| 
1592e41f4b71Sopenharmony_ci| -------- | -------- |
1593e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1594e41f4b71Sopenharmony_ci
1595e41f4b71Sopenharmony_ci**Returns**
1596e41f4b71Sopenharmony_ci
1597e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1598e41f4b71Sopenharmony_ci
1599e41f4b71Sopenharmony_ci
1600e41f4b71Sopenharmony_ci### OH_ImageEffect_RemoveFilter()
1601e41f4b71Sopenharmony_ci
1602e41f4b71Sopenharmony_ci```
1603e41f4b71Sopenharmony_ciint32_t OH_ImageEffect_RemoveFilter (OH_ImageEffect * imageEffect, const char * filterName )
1604e41f4b71Sopenharmony_ci```
1605e41f4b71Sopenharmony_ci
1606e41f4b71Sopenharmony_ci**Description**
1607e41f4b71Sopenharmony_ci
1608e41f4b71Sopenharmony_ciRemoves a filter.
1609e41f4b71Sopenharmony_ci
1610e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1611e41f4b71Sopenharmony_ci
1612e41f4b71Sopenharmony_ci**Since**: 12
1613e41f4b71Sopenharmony_ci
1614e41f4b71Sopenharmony_ci**Parameters**
1615e41f4b71Sopenharmony_ci
1616e41f4b71Sopenharmony_ci| Name| Description| 
1617e41f4b71Sopenharmony_ci| -------- | -------- |
1618e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1619e41f4b71Sopenharmony_ci| filterName | Pointer to the filter name.| 
1620e41f4b71Sopenharmony_ci
1621e41f4b71Sopenharmony_ci**Returns**
1622e41f4b71Sopenharmony_ci
1623e41f4b71Sopenharmony_ciReturns the number of filters.
1624e41f4b71Sopenharmony_ci
1625e41f4b71Sopenharmony_ci
1626e41f4b71Sopenharmony_ci### OH_ImageEffect_Restore()
1627e41f4b71Sopenharmony_ci
1628e41f4b71Sopenharmony_ci```
1629e41f4b71Sopenharmony_ciOH_ImageEffect* OH_ImageEffect_Restore (const char * info)
1630e41f4b71Sopenharmony_ci```
1631e41f4b71Sopenharmony_ci
1632e41f4b71Sopenharmony_ci**Description**
1633e41f4b71Sopenharmony_ci
1634e41f4b71Sopenharmony_ciDeserializes an image effector.
1635e41f4b71Sopenharmony_ci
1636e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1637e41f4b71Sopenharmony_ci
1638e41f4b71Sopenharmony_ci**Since**: 12
1639e41f4b71Sopenharmony_ci
1640e41f4b71Sopenharmony_ci**Parameters**
1641e41f4b71Sopenharmony_ci
1642e41f4b71Sopenharmony_ci| Name| Description| 
1643e41f4b71Sopenharmony_ci| -------- | -------- |
1644e41f4b71Sopenharmony_ci| info | Pointer to a serialized JSON string.| 
1645e41f4b71Sopenharmony_ci
1646e41f4b71Sopenharmony_ci**Returns**
1647e41f4b71Sopenharmony_ci
1648e41f4b71Sopenharmony_ciReturns an **OH_ImageEffect** instance if the deserialization is successful; returns a null pointer otherwise.
1649e41f4b71Sopenharmony_ci
1650e41f4b71Sopenharmony_ci
1651e41f4b71Sopenharmony_ci### OH_ImageEffect_Save()
1652e41f4b71Sopenharmony_ci
1653e41f4b71Sopenharmony_ci```
1654e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_Save (OH_ImageEffect * imageEffect, char ** info )
1655e41f4b71Sopenharmony_ci```
1656e41f4b71Sopenharmony_ci
1657e41f4b71Sopenharmony_ci**Description**
1658e41f4b71Sopenharmony_ci
1659e41f4b71Sopenharmony_ciSerializes an image effector.
1660e41f4b71Sopenharmony_ci
1661e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1662e41f4b71Sopenharmony_ci
1663e41f4b71Sopenharmony_ci**Since**: 12
1664e41f4b71Sopenharmony_ci
1665e41f4b71Sopenharmony_ci**Parameters**
1666e41f4b71Sopenharmony_ci
1667e41f4b71Sopenharmony_ci| Name| Description| 
1668e41f4b71Sopenharmony_ci| -------- | -------- |
1669e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1670e41f4b71Sopenharmony_ci| info | Double pointer to a char array holding a serialized JSON string.| 
1671e41f4b71Sopenharmony_ci
1672e41f4b71Sopenharmony_ci**Returns**
1673e41f4b71Sopenharmony_ci
1674e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1675e41f4b71Sopenharmony_ci
1676e41f4b71Sopenharmony_ci
1677e41f4b71Sopenharmony_ci### OH_ImageEffect_SetInputNativeBuffer()
1678e41f4b71Sopenharmony_ci
1679e41f4b71Sopenharmony_ci```
1680e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetInputNativeBuffer (OH_ImageEffect * imageEffect, OH_NativeBuffer * nativeBuffer )
1681e41f4b71Sopenharmony_ci```
1682e41f4b71Sopenharmony_ci
1683e41f4b71Sopenharmony_ci**Description**
1684e41f4b71Sopenharmony_ci
1685e41f4b71Sopenharmony_ciSets an input native buffer.
1686e41f4b71Sopenharmony_ci
1687e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1688e41f4b71Sopenharmony_ci
1689e41f4b71Sopenharmony_ci**Since**: 12
1690e41f4b71Sopenharmony_ci
1691e41f4b71Sopenharmony_ci**Parameters**
1692e41f4b71Sopenharmony_ci
1693e41f4b71Sopenharmony_ci| Name| Description| 
1694e41f4b71Sopenharmony_ci| -------- | -------- |
1695e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1696e41f4b71Sopenharmony_ci| nativeBuffer | Pointer to the **OH_NativeBuffer** instance.| 
1697e41f4b71Sopenharmony_ci
1698e41f4b71Sopenharmony_ci**Returns**
1699e41f4b71Sopenharmony_ci
1700e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1701e41f4b71Sopenharmony_ci
1702e41f4b71Sopenharmony_ci
1703e41f4b71Sopenharmony_ci### OH_ImageEffect_SetInputPixelmap()
1704e41f4b71Sopenharmony_ci
1705e41f4b71Sopenharmony_ci```
1706e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetInputPixelmap (OH_ImageEffect * imageEffect, OH_PixelmapNative * pixelmap )
1707e41f4b71Sopenharmony_ci```
1708e41f4b71Sopenharmony_ci
1709e41f4b71Sopenharmony_ci**Description**
1710e41f4b71Sopenharmony_ci
1711e41f4b71Sopenharmony_ciSets an input pixel map.
1712e41f4b71Sopenharmony_ci
1713e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1714e41f4b71Sopenharmony_ci
1715e41f4b71Sopenharmony_ci**Since**: 12
1716e41f4b71Sopenharmony_ci
1717e41f4b71Sopenharmony_ci**Parameters**
1718e41f4b71Sopenharmony_ci
1719e41f4b71Sopenharmony_ci| Name| Description| 
1720e41f4b71Sopenharmony_ci| -------- | -------- |
1721e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1722e41f4b71Sopenharmony_ci| pixelmap | Pointer to the **OH_PixelmapNative** instance.| 
1723e41f4b71Sopenharmony_ci
1724e41f4b71Sopenharmony_ci**Returns**
1725e41f4b71Sopenharmony_ci
1726e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1727e41f4b71Sopenharmony_ci
1728e41f4b71Sopenharmony_ci
1729e41f4b71Sopenharmony_ci### OH_ImageEffect_SetInputUri()
1730e41f4b71Sopenharmony_ci
1731e41f4b71Sopenharmony_ci```
1732e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetInputUri (OH_ImageEffect * imageEffect, const char * uri )
1733e41f4b71Sopenharmony_ci```
1734e41f4b71Sopenharmony_ci
1735e41f4b71Sopenharmony_ci**Description**
1736e41f4b71Sopenharmony_ci
1737e41f4b71Sopenharmony_ciSets an input URI.
1738e41f4b71Sopenharmony_ci
1739e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1740e41f4b71Sopenharmony_ci
1741e41f4b71Sopenharmony_ci**Since**: 12
1742e41f4b71Sopenharmony_ci
1743e41f4b71Sopenharmony_ci**Parameters**
1744e41f4b71Sopenharmony_ci
1745e41f4b71Sopenharmony_ci| Name| Description| 
1746e41f4b71Sopenharmony_ci| -------- | -------- |
1747e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1748e41f4b71Sopenharmony_ci| uri | Pointer to the URI.| 
1749e41f4b71Sopenharmony_ci
1750e41f4b71Sopenharmony_ci**Returns**
1751e41f4b71Sopenharmony_ci
1752e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1753e41f4b71Sopenharmony_ci
1754e41f4b71Sopenharmony_ci
1755e41f4b71Sopenharmony_ci### OH_ImageEffect_SetOutputNativeBuffer()
1756e41f4b71Sopenharmony_ci
1757e41f4b71Sopenharmony_ci```
1758e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetOutputNativeBuffer (OH_ImageEffect * imageEffect, OH_NativeBuffer * nativeBuffer )
1759e41f4b71Sopenharmony_ci```
1760e41f4b71Sopenharmony_ci
1761e41f4b71Sopenharmony_ci**Description**
1762e41f4b71Sopenharmony_ci
1763e41f4b71Sopenharmony_ciSets an output native buffer.
1764e41f4b71Sopenharmony_ci
1765e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1766e41f4b71Sopenharmony_ci
1767e41f4b71Sopenharmony_ci**Since**: 12
1768e41f4b71Sopenharmony_ci
1769e41f4b71Sopenharmony_ci**Parameters**
1770e41f4b71Sopenharmony_ci
1771e41f4b71Sopenharmony_ci| Name| Description| 
1772e41f4b71Sopenharmony_ci| -------- | -------- |
1773e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1774e41f4b71Sopenharmony_ci| nativeBuffer | Pointer to the **OH_NativeBuffer** instance.| 
1775e41f4b71Sopenharmony_ci
1776e41f4b71Sopenharmony_ci**Returns**
1777e41f4b71Sopenharmony_ci
1778e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1779e41f4b71Sopenharmony_ci
1780e41f4b71Sopenharmony_ci
1781e41f4b71Sopenharmony_ci### OH_ImageEffect_SetOutputPixelmap()
1782e41f4b71Sopenharmony_ci
1783e41f4b71Sopenharmony_ci```
1784e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetOutputPixelmap (OH_ImageEffect * imageEffect, OH_PixelmapNative * pixelmap )
1785e41f4b71Sopenharmony_ci```
1786e41f4b71Sopenharmony_ci
1787e41f4b71Sopenharmony_ci**Description**
1788e41f4b71Sopenharmony_ci
1789e41f4b71Sopenharmony_ciSets an output pixel map.
1790e41f4b71Sopenharmony_ci
1791e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1792e41f4b71Sopenharmony_ci
1793e41f4b71Sopenharmony_ci**Since**: 12
1794e41f4b71Sopenharmony_ci
1795e41f4b71Sopenharmony_ci**Parameters**
1796e41f4b71Sopenharmony_ci
1797e41f4b71Sopenharmony_ci| Name| Description| 
1798e41f4b71Sopenharmony_ci| -------- | -------- |
1799e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1800e41f4b71Sopenharmony_ci| pixelmap | Pointer to the **OH_PixelmapNative** instance.| 
1801e41f4b71Sopenharmony_ci
1802e41f4b71Sopenharmony_ci**Returns**
1803e41f4b71Sopenharmony_ci
1804e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1805e41f4b71Sopenharmony_ci
1806e41f4b71Sopenharmony_ci
1807e41f4b71Sopenharmony_ci### OH_ImageEffect_SetOutputSurface()
1808e41f4b71Sopenharmony_ci
1809e41f4b71Sopenharmony_ci```
1810e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetOutputSurface (OH_ImageEffect * imageEffect, OHNativeWindow * nativeWindow )
1811e41f4b71Sopenharmony_ci```
1812e41f4b71Sopenharmony_ci
1813e41f4b71Sopenharmony_ci**Description**
1814e41f4b71Sopenharmony_ci
1815e41f4b71Sopenharmony_ciSets an output surface.
1816e41f4b71Sopenharmony_ci
1817e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1818e41f4b71Sopenharmony_ci
1819e41f4b71Sopenharmony_ci**Since**: 12
1820e41f4b71Sopenharmony_ci
1821e41f4b71Sopenharmony_ci**Parameters**
1822e41f4b71Sopenharmony_ci
1823e41f4b71Sopenharmony_ci| Name| Description| 
1824e41f4b71Sopenharmony_ci| -------- | -------- |
1825e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1826e41f4b71Sopenharmony_ci| nativeWindow | Pointer to the **OHNativeWindow** instance.| 
1827e41f4b71Sopenharmony_ci
1828e41f4b71Sopenharmony_ci**Returns**
1829e41f4b71Sopenharmony_ci
1830e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1831e41f4b71Sopenharmony_ci
1832e41f4b71Sopenharmony_ci
1833e41f4b71Sopenharmony_ci### OH_ImageEffect_SetOutputUri()
1834e41f4b71Sopenharmony_ci
1835e41f4b71Sopenharmony_ci```
1836e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_SetOutputUri (OH_ImageEffect * imageEffect, const char * uri )
1837e41f4b71Sopenharmony_ci```
1838e41f4b71Sopenharmony_ci
1839e41f4b71Sopenharmony_ci**Description**
1840e41f4b71Sopenharmony_ci
1841e41f4b71Sopenharmony_ciSets an output URI.
1842e41f4b71Sopenharmony_ci
1843e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1844e41f4b71Sopenharmony_ci
1845e41f4b71Sopenharmony_ci**Since**: 12
1846e41f4b71Sopenharmony_ci
1847e41f4b71Sopenharmony_ci**Parameters**
1848e41f4b71Sopenharmony_ci
1849e41f4b71Sopenharmony_ci| Name| Description| 
1850e41f4b71Sopenharmony_ci| -------- | -------- |
1851e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1852e41f4b71Sopenharmony_ci| uri | Pointer to the URI.| 
1853e41f4b71Sopenharmony_ci
1854e41f4b71Sopenharmony_ci**Returns**
1855e41f4b71Sopenharmony_ci
1856e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1857e41f4b71Sopenharmony_ci
1858e41f4b71Sopenharmony_ci
1859e41f4b71Sopenharmony_ci### OH_ImageEffect_Start()
1860e41f4b71Sopenharmony_ci
1861e41f4b71Sopenharmony_ci```
1862e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_Start (OH_ImageEffect * imageEffect)
1863e41f4b71Sopenharmony_ci```
1864e41f4b71Sopenharmony_ci
1865e41f4b71Sopenharmony_ci**Description**
1866e41f4b71Sopenharmony_ci
1867e41f4b71Sopenharmony_ciStarts an image effector.
1868e41f4b71Sopenharmony_ci
1869e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1870e41f4b71Sopenharmony_ci
1871e41f4b71Sopenharmony_ci**Since**: 12
1872e41f4b71Sopenharmony_ci
1873e41f4b71Sopenharmony_ci**Parameters**
1874e41f4b71Sopenharmony_ci
1875e41f4b71Sopenharmony_ci| Name| Description| 
1876e41f4b71Sopenharmony_ci| -------- | -------- |
1877e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1878e41f4b71Sopenharmony_ci
1879e41f4b71Sopenharmony_ci**Returns**
1880e41f4b71Sopenharmony_ci
1881e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer; returns **EFFECT_INPUT_OUTPUT_NOT_SUPPORTED** if the data types of the input and output images to be processed are different; returns **EFFECT_COLOR_SPACE_NOT_MATCH** if the color spaces of the input and output images are different; returns **EFFECT_ALLOCATE_MEMORY_FAILED** if the buffer fails to be allocated.
1882e41f4b71Sopenharmony_ci
1883e41f4b71Sopenharmony_ci
1884e41f4b71Sopenharmony_ci### OH_ImageEffect_Stop()
1885e41f4b71Sopenharmony_ci
1886e41f4b71Sopenharmony_ci```
1887e41f4b71Sopenharmony_ciImageEffect_ErrorCode OH_ImageEffect_Stop (OH_ImageEffect * imageEffect)
1888e41f4b71Sopenharmony_ci```
1889e41f4b71Sopenharmony_ci
1890e41f4b71Sopenharmony_ci**Description**
1891e41f4b71Sopenharmony_ci
1892e41f4b71Sopenharmony_ciStops an image effector.
1893e41f4b71Sopenharmony_ci
1894e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.ImageEffect.Core
1895e41f4b71Sopenharmony_ci
1896e41f4b71Sopenharmony_ci**Since**: 12
1897e41f4b71Sopenharmony_ci
1898e41f4b71Sopenharmony_ci**Parameters**
1899e41f4b71Sopenharmony_ci
1900e41f4b71Sopenharmony_ci| Name| Description| 
1901e41f4b71Sopenharmony_ci| -------- | -------- |
1902e41f4b71Sopenharmony_ci| imageEffect | Pointer to the image effector.| 
1903e41f4b71Sopenharmony_ci
1904e41f4b71Sopenharmony_ci**Returns**
1905e41f4b71Sopenharmony_ci
1906e41f4b71Sopenharmony_ciReturns **EFFECT_SUCCESS** if the operation is successful; returns **EFFECT_ERROR_PARAM_INVALID** if the input parameter is a null pointer.
1907