harmony 鸿蒙image_effect_filter.h
image_effect_filter.h
Overview
The image_effect_filter.h file declares the APIs related to an image effect filter.
With these APIs, you can quickly implement basic effect processing or connect multiple filters in series in an image effector to implement complex effect processing. The system provides basic effect processing filters such as brightness and crop filters.
Library: libimage_effect.so
File to include: <multimedia/image_effect/image_effect_filter.h>
System capability: SystemCapability.Multimedia.ImageEffect.Core
Since: 12
Related module: ImageEffect
Summary
Structs
Name | Description |
---|---|
union ImageEffect_DataValue | Describes the data values. |
struct ImageEffect_Any | Describes the image effect parameters. |
struct ImageEffect_FilterNames | Describes the filter name information. |
struct ImageEffect_FilterDelegate | Describes the callback functions of a custom filter. |
struct ImageEffect_Region | Describes the image region. |
struct ImageEffect_Size | Describes the image size. |
Macros
Name | Description |
---|---|
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. |
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. |
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. |
OH_EFFECT_FILTER_INTENSITY_KEY “FilterIntensity” | Intensity filter. |
OH_EFFECT_FILTER_REGION_KEY “FilterRegion” | Image region filter. |
Types
Name | Description |
---|---|
typedef struct OH_EffectFilter OH_EffectFilter | Defines a struct for the image effect filter. |
typedef enum ImageEffect_DataType ImageEffect_DataType | Defines an enum for the data types. |
typedef union ImageEffect_DataValue ImageEffect_DataValue | Defines a union for the data values. |
typedef struct ImageEffect_Any ImageEffect_Any | Defines a struct for the image effect parameters. |
typedef enum ImageEffect_Format ImageEffect_Format | Defines an enum for the pixel formats. |
typedef enum ImageEffect_BufferType ImageEffect_BufferType | Defines an enum for the buffer types. |
typedef struct OH_EffectFilterInfo OH_EffectFilterInfo | Defines a struct for the filter information. |
typedef struct ImageEffect_FilterNames ImageEffect_FilterNames | Defines a struct for the filter name information. |
typedef struct OH_EffectBufferInfo OH_EffectBufferInfo | Defines a struct for the buffer information. |
typedef bool(* OH_EffectFilterDelegate_SetValue) (OH_EffectFilter *filter, const char *key, const ImageEffect_Any *value) | Defines a pointer to the callback function for setting parameters of a custom filter. It is used to verify parameters and parameter values. |
typedef void(* OH_EffectFilterDelegate_PushData) (OH_EffectFilter *filter, OH_EffectBufferInfo *info) | Defines a pointer to the callback function used by a custom filter to push image data to the next-level filter. |
typedef bool(* OH_EffectFilterDelegate_Render) (OH_EffectFilter *filter, OH_EffectBufferInfo *info, OH_EffectFilterDelegate_PushData pushData) | Defines a pointer to the callback function for rendering an image using a custom filter. |
typedef bool(* OH_EffectFilterDelegate_Save) (OH_EffectFilter *filter, char **info) | Defines a pointer to the callback function for serializing a custom filter. Filters are serialized in JSON format. |
typedef OH_EffectFilter *(* OH_EffectFilterDelegate_Restore) (const char *info) | Defines a pointer to the callback function for deserializing a custom filter. |
typedef struct ImageEffect_FilterDelegate ImageEffect_FilterDelegate | Describes the callback functions of a custom filter. |
typedef struct ImageEffect_Region ImageEffect_Region | Defines a struct for the image region. |
typedef struct ImageEffect_Size ImageEffect_Size | Defines a struct for the image size. |
Enums
Name | Description |
---|---|
ImageEffect_DataType { EFFECT_DATA_TYPE_UNKNOWN = 0, EFFECT_DATA_TYPE_INT32 = 1, EFFECT_DATA_TYPE_FLOAT = 2, EFFECT_DATA_TYPE_DOUBLE = 3, EFFECT_DATA_TYPE_CHAR = 4, EFFECT_DATA_TYPE_LONG = 5, EFFECT_DATA_TYPE_BOOL = 6, EFFECT_DATA_TYPE_PTR = 7 } |
Enumerates the data types. |
ImageEffect_Format { EFFECT_PIXEL_FORMAT_UNKNOWN = 0, EFFECT_PIXEL_FORMAT_RGBA8888 = 1, EFFECT_PIXEL_FORMAT_NV21 = 2, EFFECT_PIXEL_FORMAT_NV12 = 3, EFFECT_PIXEL_FORMAT_RGBA1010102 = 4, EFFECT_PIXEL_FORMAT_YCBCR_P010 = 5, EFFECT_PIXEL_FORMAT_YCRCB_P010 = 6 } |
Enumerates the pixel formats. |
ImageEffect_BufferType { EFFECT_BUFFER_TYPE_UNKNOWN = 0, EFFECT_BUFFER_TYPE_PIXEL = 1, EFFECT_BUFFER_TYPE_TEXTURE = 2 } |
Enumerates the buffer types. |
Functions
你可能感兴趣的鸿蒙文章
harmony 鸿蒙_image___native_module
harmony 鸿蒙ImageEffect_FilterDelegate
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦