Beauty makeups
The ZegoEffects SDK provides the beauty makeup feature, which can put virtual makeups on your facial features, such as eyeliner, eyelashes, blusher, lipstick, and colored eye contacts, and also provides various makeup looks.
Prerequisites
Before you begin to use the beauty makeup feature, make sure:
- You have integrated the ZegoEffects SDK and implemented basic image processing functionality. For details, see Implement basic image processing.
- You have imported the basic "MakeupResources" resource files. For details, see Import resources and models.
Implementation steps
The beauty markups include these features: eyeliner, eyeshadow, eyelashes, blusher, lipstick, colored eye contacts, and makeup looks.
Each feature provides various styles:
- Eyeliner: Natural, Cat Eye, naughty, innocent,dignified.
- Eyeshadow: Pink Mist, Shimmer Pink, Tea Brown, Bright Orange, Mocha_Brown.
- Eyelashes: Natural, Tender, Curl, Everlong, Thick.
- Blusher: Slightly Drunk, Peach, Milky Orange, Apricot Pink, Sweet Orange.
- Lipstick: Cameo Pink, Sweet Orange, Rust Red, Coral, Red Velvet.
- Colored eye contacts: Darknight Black, Starry Blue, Mystery Brown-Green, Polar Lights Brown, Chocolate Brown.
- Makeup looks: Vulnerable & Innocent Eyes, Milky Eyes, Cutie & Cool, Pure & Sexy, Flawless.
- You can't superimpose the styles of each feature. Once you apply a new style, the previous one (if any) will be overridden.
- You can superimpose the effects of eyeliner, eyeshadow, eyelashes, blusher, lipstick, and colored eye contacts, but you can't superimpose those with the makeup looks.
Specify the parameters of the beauty makeup feature as needed. If not specified, the SDK uses the default settings.
Eyeliner
-
Enable Eyeliner.
Call the setEyeliner interface to enable/disable the eyeliner feature, passing in the absolute path of the corresponding eyeliner. Call the setEyelinerParam interface to set the intensity of the eyeliner.
The "intensity" parameter of the ZegoEffectsEyelinerParam object, which represents the intensity of the eyeliner, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable eyeliner feature // 1. Enable eyeliner feature, and pass in the absolute path of the corresponding eyeliner mEffects.setEyeliner("/xxx/xxx/eyelinerdir/eyelinerdir_natural.bundle"); // Set eyeliner intensity, range [0, 100] mEffects.setEyelinerParam({ intensity: 100 });
1 -
Remove Eyeliner.
If you need to remove the eyeliner, pass
null
into the setEyeliner interface.Untitled// Remove eyeliner feature mEffects.setEyeliner(null);
1
Eyeshadow
-
Enable Eyeshadow.
Call the setEyeshadow interface to enable/disable the eyeshadow feature, passing in the absolute path of the corresponding eyeshadow. Call the setEyeshadowParam interface to set the intensity of the eyeshadow.
The "intensity" parameter of the ZegoEffectsEyeshadowParam object, which represents the intensity of the eyeshadow, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable eyeshadow feature // 1. Enable eyeshadow feature, and pass in the absolute path of the corresponding eyeshadow mEffects.setEyeshadow("/xxx/xxx/eyeshadowdir/eyeshadowdir_mist_pink.bundle"); // Set eyeshadow intensity, range [0, 100] mEffects.setEyeshadowParam({ intensity: 100 });
1 -
Remove Eyeshadow.
If you need to remove the eyeshadow, pass
null
into the setEyeshadow interface.Untitled// Remove eyeshadow feature mEffects.setEyeshadow(null);
1
Eyelashes
-
Enable Eyelashes.
Call the setEyelashes interface to enable/disable the eyelashes feature, passing in the absolute path of the corresponding eyelashes. Call the setEyelashesParam interface to set the intensity of the eyelashes.
The "intensity" parameter of the ZegoEffectsEyelashesParam object, which represents the intensity of the eyelashes, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable eyelashes feature // 1. Enable eyelashes feature, and pass in the absolute path of the corresponding eyelashes mEffects.setEyelashes("/xxx/xxx/eyelashesdir/eyelashesdir_bushy.bundle"); // Set eyelashes intensity, range [0, 100] mEffects.setEyelashesParam({ intensity: 100 });
1 -
Remove Eyelashes.
If you need to remove the eyelashes, pass
null
into the setEyelashes interface.Untitled// Remove eyelashes feature mEffects.setEyelashes(null);
1
Blusher
-
Enable Blusher.
Call the setBlusher interface to enable/disable the blusher feature, passing in the absolute path of the corresponding blusher. Call the setBlusherParam interface to set the intensity of the blusher.
The "intensity" parameter of the ZegoEffectsBlusherParam object, which represents the intensity of the blusher, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable blusher feature // 1. Enable blusher feature, and pass in the absolute path of the corresponding blusher mEffects.setBlusher("/xxx/xxx/blusherdir/blusherdir_apricot_pink.bundle"); // Set blusher intensity, range [0, 100] mEffects.setBlusherParam({ intensity: 100 });
1 -
Remove Blusher.
If you need to remove the blusher, pass
null
into the setBlusher interface.Untitled// Remove blusher feature mEffects.setBlusher(null);
1
Lipstick
-
Enable Lipstick.
Call the setLipStick interface to enable/disable the lipstick feature, passing in the absolute path of the corresponding lipstick. Call the setLipStickParam interface to set the intensity of the lipstick.
The "intensity" parameter of the ZegoEffectsLipstickParam object, which represents the intensity of the lipstick, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable lipstick feature // 1. Enable lipstick feature, and pass in the absolute path of the corresponding lipstick mEffects.setLipStick("/xxx/xxx/lipstickdir/lipstickdir_bean_paste_pink.bundle"); // Set lipstick intensity, range [0, 100] mEffects.setLipstickParam({ intensity: 100 });
1 -
Remove Lipstick.
If you need to remove the lipstick, pass
null
into the setLipStick interface.Untitled// Remove lipstick feature mEffects.setLipStick(null);
1
Colored Eye Contacts
-
Enable Colored Eye Contacts.
Call the setColoredcontacts interface to enable/disable the colored eye contacts feature, passing in the absolute path of the corresponding colored eye contacts. Call the setColoredcontactsParam interface to set the intensity of the colored eye contacts.
The "intensity" parameter of the ZegoEffectsColoredcontactsParam object, which represents the intensity of the colored eye contacts, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable colored eye contacts feature // 1. Enable colored eye contacts feature, and pass in the absolute path of the corresponding colored eye contacts mEffects.setColoredcontacts("/xxx/xxx/coloredcontactsdir/coloredcontactsdir_chocolate_brown.bundle"); // Set colored eye contacts intensity, range [0, 100] mEffects.setColoredcontactsParam({ intensity: 100 });
1 -
Remove Colored Eye Contacts.
If you need to remove the colored eye contacts, pass
null
into the setColoredcontacts interface.Untitled// Remove colored eye contacts feature mEffects.setColoredcontacts(null);
1
Makeup Looks
-
Enable Makeup Looks.
Call the setMakeup interface to enable/disable the makeup looks feature, passing in the absolute path of the corresponding makeup looks. Call the setMakeupParam interface to set the intensity of the makeup looks.
The "intensity" parameter of the ZegoEffectsMakeupParam object, which represents the intensity of the makeup looks, has a value range of [0, 100]. The higher the value, the greater the degree of effect presentation. Developers can customize the value according to their needs.
Untitled// Enable makeup looks feature // 1. Enable makeup looks feature, and pass in the absolute path of the corresponding makeup looks mEffects.setMakeup("/xxx/xxx/makeupdir/makeupdir_cutie_and_cool.bundle"); // Set makeup looks intensity, range [0, 100] mEffects.setMakeupParam({ intensity: 100 });
1 -
Remove Makeup Looks.
If you need to remove the makeup looks, pass
null
into the setMakeup interface.Untitled// Remove makeup looks feature mEffects.setMakeup(null);
1