Basic APIs for beauty filter, makeup filter, and animated widgets.
This API is used to set the beauty filter type.
- (void)setBeautyStyle:(TXBeautyStyle)level
Parameters
Parameter | Type | Description |
---|---|---|
level | TXBeautyStyle | Beauty filter style. TXBeautyStyleSmooth indicates smooth; TXBeautyStyleNature indicates natural; and TXBeautyStylePitu indicates misty. |
This API is used to specify the material filter effect.
- (void)setFilter:(TXImage *)image
Note:Filter images must be in the PNG format. The filter lookup table image used in the demo is located in
TXLiteAVDemo/Resource/Beauty/filter/FilterResource.bundle
.
This API is used to set the strength of a filter.
- (void)setFilterStrength:(float)strength
Parameters
Parameter | Type | Description |
---|---|---|
strength | float | Value range: 0-1. The larger the value, the more obvious the effect. Default value: 0.5. |
Introduction
In application scenarios such as shows, a high strength is required to highlight the characteristics of hosts. The default strength is 0.5, and if it is not sufficient, it can be adjusted with the following APIs.
This API is used to set the green screen effect for videos. It works only in the Enterprise Edition.
- (void)setGreenScreenFile:(NString *)file
Parameters
Parameter | Type | Description |
---|---|---|
file | NString * | Path to the video file, which can be in MP4 format. nil: disable the effect. |
Introduction
The green screen feature here is not intelligent keying. It requires that a green screen exists behind the recorded person or object for further chroma keying.
This API is used to set the strength of the beauty filter.
- (void)setBeautyLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the beauty filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the skin brightening filter.
- (void)setWhitenessLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the skin brightening filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the rosy skin filter.
- (void)setRuddyLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the rosy skin filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the eye enlarging filter. It works only in the Enterprise Edition.
- (void)setEyeScaleLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the eye enlarging filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the face slimming filter. It works only in the Enterprise Edition.
- (void)setFaceSlimLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the face slimming filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the chin slimming filter. It works only in the Enterprise Edition.
- (void)setFaceVLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the chin slimming filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the jaw shrinking or expanding filter. It works only in the Enterprise Edition.
- (void)setChinLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the jaw shrinking or expanding filter. Value range: -9 to 9. 0 means disabling the filter. Values less than 0 mean shrinking the jaw, and values greater than 0 mean expanding the jaw. |
This API is used to set the strength of the face shortening filter. It works only in the Enterprise Edition.
- (void)setFaceShortLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the face shortening filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the nose slimming filter. It works only in the Enterprise Edition.
- (void)setNoseSlimLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the nose slimming filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the eye brightening filter. It works only in the Enterprise Edition.
- (void)setEyeLightenLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the eye brightening filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the teeth whitening filter. It works only in the Enterprise Edition.
- (void)setToothWhitenLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the teeth whitening filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the wrinkle removal filter. It works only in the Enterprise Edition.
- (void)setWrinkleRemoveLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the wrinkle removal filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the eye bag removal filter. It works only in the Enterprise Edition.
- (void)setPounchRemoveLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the eye bag removal filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the smile line removal filter. It works only in the Enterprise Edition.
- (void)setSmileLinesRemoveLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the smile line removal filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to set the strength of the hairline lowering filter. It works only in the Enterprise Edition.
- (void)setForeheadLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the hairline lowering filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the lower the hairline. |
This API is used to set the strength of the eye distance shortening filter. It works only in the Enterprise Edition.
- (void)setEyeDistanceLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the eye distance shortening filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the shorter the eye distance. |
This API is used to set the strength of the eye tilting filter. It works only in the Enterprise Edition.
- (void)setEyeAngleLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the eye tilting filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more upward the outer eye corners, and the more downward the inner eye corners. |
This API is used to set the strength of the mouth narrowing filter. It works only in the Enterprise Edition.
- (void)setMouthShapeLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the mouth narrowing filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the smaller the mouth. |
This API is used to set the strength of the nose wing narrowing filter. It works only in the Enterprise Edition.
- (void)setNoseWingLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the nose wing narrowing filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the smaller the nose wing. |
This API is used to set nose position. It works only in the Enterprise Edition.
- (void)setNosePositionLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Nose position level. Value range: 0-9. 0 means disabling the filter. The larger the value, the lower the nose position. |
This API is used to set the strength of the lip thickening filter. It works only in the Enterprise Edition.
- (void)setLipsThicknessLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the lip thickening filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the thicker the lips. |
This API is used to set the strength of the face shape filter. It works only in the Enterprise Edition.
- (void)setFaceBeautyLevel:(float)level
Parameters
Parameter | Type | Description |
---|---|---|
level | float | Strength of the face shape filter. Value range: 0-9. 0 means disabling the filter. The larger the value, the more obvious the effect. |
This API is used to select AI animated effect widgets. It works only in the Enterprise Edition.
- (void)setMotionTmpl:(nullable NSString *)tmplName inDir:(nullable NSString *)tmplDir
Parameters
Parameter | Type | Description |
---|---|---|
tmplDir | NSString * | Directory of the animated effect. |
tmplName | NSString * | Animated effect name. |
This API is used to mute animated effects. It works only in the Enterprise Edition. Some animated effects have audio effects, which can be disabled through this API when they are played back.
- (void)setMotionMute:(BOOL)motionMute
Parameters
Parameter | Type | Description |
---|---|---|
motionMute | BOOL | YES: mute. NO: unmute. |
Was this page helpful?