#import <NERtcBeauty.h>
◆ addBeautyFilterWithPath:andName:
- (void) addBeautyFilterWithPath: |
|
(NSString *) |
path |
andName: |
|
(NSString *) |
name |
|
|
| |
Add filters.
The API is used to load filter assets and add related filter effects. To change a filter, call this method for a new filter.
- Note
- Before applying filters, stickers, and makeups, you must call
NERtcBeauty#addTempleteWithPath:andName:
to import beauty assets or models.
- A filter effect can be applied together with global beauty effects, stickers, and makeups. However, multiple filters cannot be applied at the same time.
- Since
- V4.2.202
- Parameters
-
path | The path of the filter assets or models. An absolute path is required. |
name | The name of the filter assets or model file. |
- Returns
- 0: success
- Others: failure
◆ addBeautyMakeupWithPath:andName:
- (void) addBeautyMakeupWithPath: |
|
(NSString *) |
path |
andName: |
|
(NSString *) |
name |
|
|
| |
Adds a makeup effect (beta).
The API is used to load makeup assets and add related sticker effects. To change a makeup effect, call this method for a new makeup effect.
- Note
- Before applying filters, stickers, and makeups, you must call
NERtcBeauty#addTempleteWithPath:andName:
to import beauty assets or models.
- A makeup effect can be applied together with global beauty effects, stickers, and makeups. However, multiple makeup effects cannot be applied at the same time.
- Since
- V4.2.202
- Parameters
-
path | The path of the sticker assets or models. An absolute path is required. |
name | The name of the sticker assets or model file. |
- Returns
- 0: success
- Others: failure
◆ addBeautyStickerWithPath:andName:
- (void) addBeautyStickerWithPath: |
|
(NSString *) |
path |
andName: |
|
(NSString *) |
name |
|
|
| |
Adds a sticker (beta).
The API is used to load sticker assets and add related sticker effects. To change a sticker, call this method for a new sticker.
- Note
- Before applying filters, stickers, and makeups, you must call
NERtcBeauty#addTempleteWithPath:andName:
to import beauty assets or models.
- A sticker effect can be applied together with global beauty effects, stickers, and makeups. However, multiple stickers cannot be applied at the same time.
- Since
- V4.2.202
- Parameters
-
path | The path of the sticker assets or models. An absolute path is required. |
name | The name of the sticker assets or model file. |
- Returns
- 0: success
- Others: failure
◆ addTempleteWithPath:andName:
- (int) addTempleteWithPath: |
|
(NSString *) |
path |
andName: |
|
(NSString *) |
name |
|
|
| |
Imports beauty assets or models.
- Note
- Before you use custom beauty effects, import beauty assets or models using this method.
- If the asset directory or name does not change when the beauty feature is applied, you need to import the assets once. If you want to change the assets, you must import your assets again by calling this method.
- Since
- V4.2.202
- Parameters
-
path | The path of the beauty assets or models. An absolute path is required. |
name | The name of the beauty assets or model file. |
- Returns
- 0: success
- Others: failure
◆ getError
Gets error messages related to beauty
- Since
- V4.2.202
- Returns
- Error code.
- 0: success.
- 1: No permissions. Contact your account manager for billing rules and activate the beauty feature.
- 100: Internal engine error. Contact the technical support for help.
◆ removeBeautyFilter
- (void) removeBeautyFilter |
|
|
|
Removes a filter effect.
- Since
- V4.2.202
- Returns
- 0: success
- Others: failure
◆ removeBeautyMakeup
- (void) removeBeautyMakeup |
|
|
|
Removes a makeup effect (beta).
- Since
- V4.2.202
- Returns
- 0: success
- Others: failure
◆ removeBeautySticker
- (void) removeBeautySticker |
|
|
|
Removes a sticker (beta).
- Since
- V4.2.202
- Returns
- 0: success
- Others: failure
◆ setBeautyEffectWithValue:atType:
Sets the beauty type and intensity.
- The method can set various types of beauty effects, such as smoothing, whitening, and big eyes.
- Multiple method calls can apply multiple global effects. Filters, stickers, and makeups can be added in the same way.
- Since
- V4.2.202
- Parameters
-
type | Beauty type. For more information, see NERtcBeautyEffectType . |
value | Beauty intensity. Value range: [0, 1]. The default values of effects are different. |
- Returns
- 0: success
- Others: failure
◆ shareInstance
◆ startBeauty
Enables the beauty module.
- The API starts the beauty engine. If beauty is not needed, you can call
NERtcBeauty#stopBeauty
to end the beauty module, destroy the beauty engine and release resources.
- When the beauty module is enabled, no beauty effect is applied by default. You must set beauty effects or filters by calling
NERtcBeauty#setBeautyEffectWithValue:atType:
or other filters and stickers methods. - Note
- The method must be called before
INERtcEngine#enableLocalVideo
.
- Since
- V4.2.202
- Returns
- 0: success.
- 30001 (kNERtcErrFatal): failure.
- 30004 (kNERtcErrNotSupported): beauty is not supported.
◆ stopBeauty
Stops the beauty module.
If the beauty module is not needed, you can call NERtcBeauty#stopBeauty
to stop the module. The SDK will automatically destroy the beauty engine and release the resources.
- Since
- V4.2.202
- Returns
- 0: success
- Others: failure
◆ bigEye
Applies big eyes.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ brightEye
Applies bright eyes.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ cheekBoneStrength
- (float) cheekBoneStrength |
|
readwritenonatomicassign |
Adjusts the cheekbone.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ eyesAngle
Adjusts the eye angle.
Value range:[0.0, 1.0] 0.5 indicates no effect. 0.0 and 1.0 indicate the maximum effect. The default value is 0.5.
◆ eyesDistance
Adjusts the eye distance.
Value range:[0.0, 1.0] 0.5 indicates no effect. 0.0 and 1.0 indicate the maximum effect. The default value is 0.5.
◆ faceRuddyStrength
- (float) faceRuddyStrength |
|
readwritenonatomicassign |
Applies a ruddy face.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ faceSharpenStrength
- (float) faceSharpenStrength |
|
readwritenonatomicassign |
Sharpens the face.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ filterStrength
Sets the filter intensity Value range: 0 - 1.
Default value: 0.0. A larger value indicates more intensity. Developers can adjust a custom value based on business requirements. The setting takes effect when it is applied. The intensity remains if a filter is changes. You can adjust the intensity by setting this property.
◆ flipX
Enables or disables the mirror mode when beauty is enabled.
The default value NO indicates that the mirror mode is enabled.
- If beauty is enabled, this property enables or disables the mirror mode. The mirror mode is disabled by default. If beauty is paused or disabled, the property becomes invalid.
- After the mirror mode is enabled, the local screen will flip left and right.
- This property is deprecated.
◆ isLandscape
Set the screen to the landscape orientation when beauty is enabled The default value NO indicates that the landscape orientation is applied when beauty is enabled.
- If beauty is enabled, this property sets the screen to the landscape orientation. The landscape orientation is disabled by default. If beauty is paused or disabled, the property becomes invalid.
- If the screen is set to the landscape orientation, the images will be processed in the landscape orientation.
- This property is deprecated.
◆ isOpenBeauty
Pauses or resumes the beauty effect
The beauty effect is paused, including the global beauty effect, filters, stickers, and makeups, until the effect is resumed.
- Note
- Beauty effect is enabled by default. If you want to temporarily disable the beauty effect, call the isOpenBeauty method after invoking
startBeauty
.
- Since
- V4.2.202
- Parameters
-
enable | specifies whether to resume the beauty effect.
- YES (default): resumes the beauty effect.
- NO: pauses the beauty effect.
|
- Returns
- 0: success
- Others: failure
◆ jaw
Adjusts the jaw.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ longNoseStrength
- (float) longNoseStrength |
|
readwritenonatomicassign |
Applies a long nose.
Value range:[0.0, 1.0] 0.5 indicates no effect. 0.0 and 1.0 indicate the maximum effect. The default value is 0.5.
◆ mouth
Adjusts the mouth shape.
Value range:[0.0, 1.0] 0.5 indicates no effect. 0.0 and 1.0 indicate the maximum effect. The default value is 0.5.
◆ mouthAngle
Adjusts the mouth angle.
Value range:[0.0, 1.0] 0.5 indicates no effect. 0.0 and 1.0 indicate the maximum effect. The default value is 0.5.
◆ narrowFaceStrength
- (float) narrowFaceStrength |
|
readwritenonatomicassign |
Applies a narrow face.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ openEyeAngleStrength
- (float) openEyeAngleStrength |
|
readwritenonatomicassign |
Adjusts the eye corners.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ renZhongStrength
- (float) renZhongStrength |
|
readwritenonatomicassign |
Adjusts the philtrum.
Value range:[0.0, 1.0] 0.5 indicates no effect. 0.0 and 1.0 indicate the maximum effect. The default value is 0.5.
◆ roundEyeStrength
- (float) roundEyeStrength |
|
readwritenonatomicassign |
Applies round eyes.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ smallFace
Applies a small face.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ smallNose
Applies a small nose.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ smoothSkin
Smoothing.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ teeth
Applies bright teeth.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ thinFace
Applies a thin face.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ thinUnderjawStrength
- (float) thinUnderjawStrength |
|
readwritenonatomicassign |
Applies a thin jaw.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ vFaceStrength
Applies a V-shaped face.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
◆ whiteSkin
Whitening.
Value range:[0.0, 1.0] 0.0 indicates no effect. 1.0 indicates the maximum effect. The default value is 0.0.
The documentation for this class was generated from the following file: