1# ImageEffect_FilterNames 2 3## Overview 4 5The ImageEffect_FilterNames struct describes the filter name information. 6 7**Since**: 12 8 9**Related module**: [ImageEffect](capi-imageeffect.md) 10 11**Header file**: [image_effect_filter.h](capi-image-effect-filter-h.md) 12 13## Summary 14 15### Member Variables 16 17| Name| Description| 18| -- | -- | 19| uint32_t size = 0 | Number of filter names.| 20| const char** nameList = nullptr | List of filter names.| 21 22 23### Member functions 24 25| Name| typedef Keyword| Description| 26| -- | -- | -- | 27| [OH_EffectFilterInfo *OH_EffectFilterInfo_Create()](#oh_effectfilterinfo_create) | OH_EffectFilterInfo_Create() | Creates an OH_EffectFilterInfo instance. The instance must be released by calling [OH_EffectFilterInfo_Release](capi-imageeffect-imageeffect-filternames.md#oh_effectfilterinfo_release) when it is no longer needed.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 28| [ImageEffect_ErrorCode OH_EffectFilterInfo_SetFilterName(OH_EffectFilterInfo *info, const char *name)](#oh_effectfilterinfo_setfiltername) | OH_EffectFilterInfo_SetFilterName() | Sets a filter name.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 29| [ImageEffect_ErrorCode OH_EffectFilterInfo_GetFilterName(OH_EffectFilterInfo *info, char **name)](#oh_effectfilterinfo_getfiltername) | OH_EffectFilterInfo_GetFilterName() | Obtains a filter name.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 30| [ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedBufferTypes(OH_EffectFilterInfo *info, uint32_t size,ImageEffect_BufferType *bufferTypeArray)](#oh_effectfilterinfo_setsupportedbuffertypes) | OH_EffectFilterInfo_SetSupportedBufferTypes() | Sets the buffer types supported by a filter.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 31| [ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedBufferTypes(OH_EffectFilterInfo *info, uint32_t *size,ImageEffect_BufferType **bufferTypeArray)](#oh_effectfilterinfo_getsupportedbuffertypes) | OH_EffectFilterInfo_GetSupportedBufferTypes() | Obtains the buffer types supported by a filter.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 32| [ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedFormats(OH_EffectFilterInfo *info, uint32_t size,ImageEffect_Format *formatArray)](#oh_effectfilterinfo_setsupportedformats) | OH_EffectFilterInfo_SetSupportedFormats() | Sets the pixel formats supported by a filter.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 33| [ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedFormats(OH_EffectFilterInfo *info, uint32_t *size,ImageEffect_Format **formatArray)](#oh_effectfilterinfo_getsupportedformats) | OH_EffectFilterInfo_GetSupportedFormats() | Obtains the pixel formats supported by a filter.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 34| [ImageEffect_ErrorCode OH_EffectFilterInfo_Release(OH_EffectFilterInfo *info)](#oh_effectfilterinfo_release) | OH_EffectFilterInfo_Release() | Destroys an OH_EffectFilterInfo instance.<br>**Since**: 12<br>**System capability**: SystemCapability.Multimedia.ImageEffect.Core| 35 36## Member Function Description 37 38### OH_EffectFilterInfo_Create() 39 40``` 41OH_EffectFilterInfo *OH_EffectFilterInfo_Create() 42``` 43 44**Description** 45 46Creates an OH_EffectFilterInfo instance. The instance must be released by calling [OH_EffectFilterInfo_Release](capi-imageeffect-imageeffect-filternames.md#oh_effectfilterinfo_release) when it is no longer needed. 47 48**System capability**: SystemCapability.Multimedia.ImageEffect.Core 49 50**Since**: 12 51 52**Returns** 53 54| Type| Description| 55| -- | -- | 56| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) | Pointer to the OH_EffectFilterInfo instance created. If the operation fails, a null pointer is returned.| 57 58### OH_EffectFilterInfo_SetFilterName() 59 60``` 61ImageEffect_ErrorCode OH_EffectFilterInfo_SetFilterName(OH_EffectFilterInfo *info, const char *name) 62``` 63 64**Description** 65 66Sets a filter name. 67 68**System capability**: SystemCapability.Multimedia.ImageEffect.Core 69 70**Since**: 12 71 72**Parameters** 73 74| Name| Description| 75| -- | -- | 76| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 77| const char *name | Pointer to the filter name, for example, **OH_EFFECT_BRIGHTNESS_FILTER**.| 78 79**Returns** 80 81| Type| Description| 82| -- | -- | 83| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 84 85### OH_EffectFilterInfo_GetFilterName() 86 87``` 88ImageEffect_ErrorCode OH_EffectFilterInfo_GetFilterName(OH_EffectFilterInfo *info, char **name) 89``` 90 91**Description** 92 93Obtains a filter name. 94 95**System capability**: SystemCapability.Multimedia.ImageEffect.Core 96 97**Since**: 12 98 99**Parameters** 100 101| Name| Description| 102| -- | -- | 103| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 104| char **name | Double pointer to the char array holding the filter name.| 105 106**Returns** 107 108| Type| Description| 109| -- | -- | 110| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 111 112### OH_EffectFilterInfo_SetSupportedBufferTypes() 113 114``` 115ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedBufferTypes(OH_EffectFilterInfo *info, uint32_t size,ImageEffect_BufferType *bufferTypeArray) 116``` 117 118**Description** 119 120Sets the buffer types supported by a filter. 121 122**System capability**: SystemCapability.Multimedia.ImageEffect.Core 123 124**Since**: 12 125 126**Parameters** 127 128| Name| Description| 129| -- | -- | 130| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 131| uint32_t size | Number of buffer types supported, each of which is [ImageEffect_BufferType](capi-image-effect-filter-h.md#imageeffect_buffertype).| 132| ImageEffect_BufferType *bufferTypeArray | Pointer to the array holding the buffer types supported, each of which is [ImageEffect_BufferType](capi-image-effect-filter-h.md#imageeffect_buffertype).| 133 134**Returns** 135 136| Type| Description| 137| -- | -- | 138| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 139 140### OH_EffectFilterInfo_GetSupportedBufferTypes() 141 142``` 143ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedBufferTypes(OH_EffectFilterInfo *info, uint32_t *size,ImageEffect_BufferType **bufferTypeArray) 144``` 145 146**Description** 147 148Obtains the buffer types supported by a filter. 149 150**System capability**: SystemCapability.Multimedia.ImageEffect.Core 151 152**Since**: 12 153 154**Parameters** 155 156| Name| Description| 157| -- | -- | 158| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 159| uint32_t *size | Pointer to the number of buffer types supported, each of which is [ImageEffect_BufferType](capi-image-effect-filter-h.md#imageeffect_buffertype).| 160| ImageEffect_BufferType **bufferTypeArray | Double pointer to the array holding the buffer types supported, each of which is [ImageEffect_BufferType](capi-image-effect-filter-h.md#imageeffect_buffertype).| 161 162**Returns** 163 164| Type| Description| 165| -- | -- | 166| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 167 168### OH_EffectFilterInfo_SetSupportedFormats() 169 170``` 171ImageEffect_ErrorCode OH_EffectFilterInfo_SetSupportedFormats(OH_EffectFilterInfo *info, uint32_t size,ImageEffect_Format *formatArray) 172``` 173 174**Description** 175 176Sets the pixel formats supported by a filter. 177 178**System capability**: SystemCapability.Multimedia.ImageEffect.Core 179 180**Since**: 12 181 182**Parameters** 183 184| Name| Description| 185| -- | -- | 186| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 187| uint32_t size | Number of pixel formats supported, each of which is [ImageEffect_Format](capi-image-effect-filter-h.md#imageeffect_format).| 188| ImageEffect_Format *formatArray | Pointer to the array holding the pixel formats supported, each of which is [ImageEffect_Format](capi-image-effect-filter-h.md#imageeffect_format).| 189 190**Returns** 191 192| Type| Description| 193| -- | -- | 194| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 195 196### OH_EffectFilterInfo_GetSupportedFormats() 197 198``` 199ImageEffect_ErrorCode OH_EffectFilterInfo_GetSupportedFormats(OH_EffectFilterInfo *info, uint32_t *size,ImageEffect_Format **formatArray) 200``` 201 202**Description** 203 204Obtains the pixel formats supported by a filter. 205 206**System capability**: SystemCapability.Multimedia.ImageEffect.Core 207 208**Since**: 12 209 210**Parameters** 211 212| Name| Description| 213| -- | -- | 214| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 215| uint32_t *size | Pointer to the number of pixel formats supported, each of which is [ImageEffect_Format](capi-image-effect-filter-h.md#imageeffect_format).| 216| ImageEffect_Format **formatArray | Double pointer to the array holding the pixel formats supported, each of which is [ImageEffect_Format](capi-image-effect-filter-h.md#imageeffect_format).| 217 218**Returns** 219 220| Type| Description| 221| -- | -- | 222| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 223 224### OH_EffectFilterInfo_Release() 225 226``` 227ImageEffect_ErrorCode OH_EffectFilterInfo_Release(OH_EffectFilterInfo *info) 228``` 229 230**Description** 231 232Destroys an OH_EffectFilterInfo instance. 233 234**System capability**: SystemCapability.Multimedia.ImageEffect.Core 235 236**Since**: 12 237 238**Parameters** 239 240| Name| Description| 241| -- | -- | 242| [OH_EffectFilterInfo](capi-imageeffect-oh-effectfilterinfo.md) *info | Pointer to the filter information.| 243 244**Returns** 245 246| Type| Description| 247| -- | -- | 248| [ImageEffect_ErrorCode](capi-image-effect-errors-h.md#imageeffect_errorcode) | [EFFECT_SUCCESS](capi-image-effect-errors-h.md#imageeffect_errorcode): The function is called successfully.<br> [EFFECT_ERROR_PARAM_INVALID](capi-image-effect-errors-h.md#imageeffect_errorcode): The input parameter is a null pointer.| 249