harmony 鸿蒙image_effect.h
image_effect.h
Overview
The image_effect.h file declares the APIs related to an image effector.
You can use the APIs to add, delete, and query image effect filters. You can connect multiple filters in series to implement complex effect adjustment.
The effector supports multiple input types, such as PixelMap, URI, surface, and picture. Different input types are converted into buffer objects in the effector, and effect processing is implemented through the filters.
Library: libimage_effect.so
File to include: <multimedia/image_effect/image_effect.h>
System capability: SystemCapability.Multimedia.ImageEffect.Core
Since: 12
Related module: ImageEffect
Summary
Types
Name | Description |
---|---|
typedef struct OH_ImageEffect OH_ImageEffect | Defines a struct for the image effector. |
Functions
Name | Description |
---|---|
OH_ImageEffect * OH_ImageEffect_Create (const char *name) | Creates an OH_ImageEffect instance. The instance must be released by calling OH_ImageEffect_Release when it is no longer needed. |
OH_EffectFilter * OH_ImageEffect_AddFilter (OH_ImageEffect *imageEffect, const char *filterName) | Adds a filter. |
ImageEffect_ErrorCode OH_ImageEffect_AddFilterByFilter (OH_ImageEffect *imageEffect, OH_EffectFilter *filter) | Adds a specified filter. |
OH_EffectFilter * OH_ImageEffect_InsertFilter (OH_ImageEffect *imageEffect, uint32_t index, const char *filterName) | Inserts a filter. |
ImageEffect_ErrorCode OH_ImageEffect_InsertFilterByFilter (OH_ImageEffect *imageEffect, uint32_t index, OH_EffectFilter *filter) | Inserts a filter to the specified position. |
int32_t OH_ImageEffect_RemoveFilter (OH_ImageEffect *imageEffect, const char *filterName) | Removes a filter. |
ImageEffect_ErrorCode OH_ImageEffect_RemoveFilterByIndex (OH_ImageEffect *imageEffect, uint32_t index) | Removes a filter from the specified position. |
OH_EffectFilter * OH_ImageEffect_ReplaceFilter (OH_ImageEffect *imageEffect, uint32_t index, const char *filterName) | Replaces a filter. |
ImageEffect_ErrorCode OH_ImageEffect_ReplaceFilterByFilter (OH_ImageEffect *imageEffect, uint32_t index, const char *filterName) | Replaces a filter at the specified position. |
int32_t OH_ImageEffect_GetFilterCount (OH_ImageEffect *imageEffect) | Obtains the number of added filters. |
OH_EffectFilter * OH_ImageEffect_GetFilter (OH_ImageEffect *imageEffect, uint32_t index) | Obtains the information about a filter. |
ImageEffect_ErrorCode OH_ImageEffect_Configure (OH_ImageEffect *imageEffect, const char *key, const ImageEffect_Any *value) | Configures an image effector. |
ImageEffect_ErrorCode OH_ImageEffect_SetOutputSurface (OH_ImageEffect *imageEffect, OHNativeWindow *nativeWindow) | Sets an output surface. |
ImageEffect_ErrorCode OH_ImageEffect_GetInputSurface (OH_ImageEffect *imageEffect, OHNativeWindow **nativeWindow) | Obtains an input surface. |
ImageEffect_ErrorCode OH_ImageEffect_SetInputPixelmap (OH_ImageEffect *imageEffect, OH_PixelmapNative *pixelmap) | Sets an input PixelMap. |
ImageEffect_ErrorCode OH_ImageEffect_SetOutputPixelmap (OH_ImageEffect *imageEffect, OH_PixelmapNative *pixelmap) | Sets an output PixelMap. |
ImageEffect_ErrorCode OH_ImageEffect_SetInputNativeBuffer (OH_ImageEffect *imageEffect, OH_NativeBuffer *nativeBuffer) | Sets an input native buffer. |
ImageEffect_ErrorCode OH_ImageEffect_SetOutputNativeBuffer (OH_ImageEffect *imageEffect, OH_NativeBuffer *nativeBuffer) | Sets an output native buffer. |
ImageEffect_ErrorCode OH_ImageEffect_SetInputUri (OH_ImageEffect *imageEffect, const char *uri) | Sets an input URI. |
ImageEffect_ErrorCode OH_ImageEffect_SetOutputUri (OH_ImageEffect *imageEffect, const char *uri) | Sets an output URI. |
ImageEffect_ErrorCode OH_ImageEffect_SetInputPicture (OH_ImageEffect *imageEffect, OH_PictureNative *picture) | Sets an input picture. |
ImageEffect_ErrorCode OH_ImageEffect_SetOutputPicture (OH_ImageEffect *imageEffect, OH_PictureNative *picture) | Sets an output picture. |
ImageEffect_ErrorCode OH_ImageEffect_Start (OH_ImageEffect *imageEffect) | Starts an image effector. |
ImageEffect_ErrorCode OH_ImageEffect_Stop (OH_ImageEffect *imageEffect) | Stops an image effector. |
ImageEffect_ErrorCode OH_ImageEffect_Release (OH_ImageEffect *imageEffect) | Releases an OH_ImageEffect instance. |
ImageEffect_ErrorCode OH_ImageEffect_Save (OH_ImageEffect *imageEffect, char **info) | Serializes an image effector. |
OH_ImageEffect * OH_ImageEffect_Restore (const char *info) | Deserializes an image effector. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙_image___native_module
harmony 鸿蒙ImageEffect_FilterDelegate
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦