logo
On this page

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:

  • Integrate the ZegoEffects SDK into your project. For details, see Integration.
  • Implement the basic image processing functionality. For details, see Implementation.

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.
Warning
  • 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.

You can choose to use any beauty makeup feature as needed by specifying the corresponding beauty makeup resource.

In general, take the following steps to use a beauty makeup feature:

  1. Enable the feature.
  2. Specify the parameters of the beauty makeup feature as needed. If not specified, the SDK uses the default settings.

Eyeliner

Use the eyeliner

  1. To apply the eyeliner, call the setEyeliner method with the path of the eyeliner resource passed to the path parameter.
  2. To set the intensity, call the setEyelinerParam method. The value range of the intensity property of ZegoEffectsEyelinerParam is [0, 100]. As this value gets larger, the effect gets stronger.
    Untitled
    // Enable the eyeliner feature.
    // 1. Enable the feature, and pass the path of the eyeliner resource. 
    mEffects.setEyeliner("/xxx/xxx/eyelinerdir/eyelinerdir_natural.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsEyelinerParam param = new ZegoEffectsEyelinerParam();
    param.intensity = 100;
    mEffects.setEyelinerParam(param);
    
    1
    Copied!

Remove the eyeliner

To remove the eyeliner, call the setEyeliner method with the path parameter set to nil.

Untitled
// Remove the eyeliner.
mEffects.setEyeliner(null);
1
Copied!

Eyeshadow

Use the eyeshadow

  1. To apply the eyeshadow, call the setEyeshadow method with the path of the eyeshadow resource passed to the path parameter.
  2. To set the intensity, call the setEyeshadowParam method. The value range of the intensity property of ZegoEffectsEyeshadowParam is [0, 100]. As this value gets larger, the effect gets stronger.
    Untitled
    // Enable the eyeshadow feature.
    // 1. Enable the feature, and pass the path of the eyeshadow resource. 
    mEffects.setEyeshadow("/xxx/xxx/eyeshadowdir/eyeshadowdir_mist_pink.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsEyeshadowParam param = new ZegoEffectsEyeshadowParam();
    param.intensity = 100;
    mEffects.setEyeshadowParam(param);
    
    1
    Copied!

Remove the eyeshadow

To remove the eyeshadow, call the setEyeshadow method with the path parameter set to nil.

Untitled
// Remove the eyeshadow.
mEffects.setEyeshadow(null);    
1
Copied!

Eyelashes

Use the eyelashes

  1. To apply the eyelashes, call the setEyelashes method with the path of the eyelashes resource passed to the path parameter.

  2. To set the intensity, call the setEyelashesParam method. The value range of the intensity property of ZegoEffectsEyelashesParam is [0, 100]. As this value gets larger, the effect gets stronger.

    Untitled
    // Enable the eyelashes feature.
    // 1. Enable the feature, and pass the path of the eyelashes resource. 
    mEffects.setEyelashes("/xxx/xxx/eyelashesdir/eyelashesdir_bushy.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsEyelashesParam param = new ZegoEffectsEyelashesParam();
    param.intensity = 100;
    mEffects.setEyelashesParam(param);
    
    1
    Copied!

Remove the eyelashes

To remove the eyelashes, call the setEyelashes method with the path parameter set to nil.

Untitled
// Remove the eyelashes.       
mEffects.setEyelashes(null);    
1
Copied!

Blusher

Use the blusher

  1. To apply the blusher, call the setBlusher method with the path of the blusher resource passed to the path parameter.

  2. To set the intensity, call the setBlusherParam method. The value range of the intensity property of ZegoEffectsBlusherParam is [0, 100]. As this value gets larger, the effect gets stronger.

    Untitled
    // Enable the blusher feature.
    // 1. Enable the feature, and pass the path of the blusher resource.
    mEffects.setBlusher("/xxx/xxx/blusherdir/blusherdir_apricot_pink.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsBlusherParam param = new ZegoEffectsBlusherParam();
    param.intensity = 100;
    mEffects.setBlusherParam(param);
    
    1
    Copied!

Remove the blusher

To remove the blusher, call the setBlusher method with the path parameter set to nil.

Untitled
// Remove the blusher.
mEffects.setBlusher(null);  
1
Copied!

Lipstick

Use the lipstick

  1. To apply the lipstick, call the setLipStick method with the path of the lipstick resource passed to the path parameter.

  2. To set the intensity, call the setLipStickParam method. The value range of the intensity property of ZegoEffectsLipstickParam is [0, 100]. As this value gets larger, the effect gets stronger.

    Untitled
    // Enable the lipstick feature.
    // 1. Enable the feature, and pass the path of the lipstick resource.
    mEffects.setLipStick("/xxx/xxx/lipstickdir/lipstickdir_bean_paste_pink.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsLipstickParam param = new ZegoEffectsLipstickParam();
    param.intensity = 100;
    mEffects.setLipstickParam(param);
    
    1
    Copied!

Remove the lipstick

To remove the lipstick, call the setLipStick method with the path parameter set to nil.

Untitled
// Remove the lipstick.
mEffects.setLipStick(null);  
1
Copied!

Colored eye contacts

Use the colored eye contacts

  1. To apply the colored eye contacts, call the setColoredcontacts method with the path of the colored eye contacts resource passed to the path parameter.

  2. To set the intensity, call the setColoredcontactsParam method. The value range of the intensity property of ZegoEffectsColoredcontactsParam is [0, 100]. As this value gets larger, the effect gets stronger.

    Untitled
    // Enable the colored contacts feature.
    // 1. Enable the feature, and pass the path of the colored eye contacts resource.
    mEffects.setColoredcontacts("/xxx/xxx/coloredcontactsdir/coloredcontactsdir_chocolate_brown.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsColoredcontactsParam param = new ZegoEffectsColoredcontactsParam();
    param.intensity = 100;
    mEffects.setColoredcontactsParam(param);
    
    1
    Copied!

Remove the colored eye contacts

To remove the colored eye contacts, call the setColoredcontacts method with the path parameter set to nil.

Untitled
// Remove the colored eye contacts.
mEffects.setColoredcontacts(null);  
1
Copied!

Makeup looks

Warning

For versions prior to 2.0.0, you can't superimpose the makeup looks and pendants. Once you apply a makeup look, the pendants will be overridden.

Use the makeup looks

  1. To apply the makeup looks, call the setMakeup method with the path of the makeup look resource passed to the path parameter.

  2. To set the intensity, call the setMakeupParam method. The value range of the intensity property of ZegoEffectsMakeupParam is [0, 100]. As this value gets larger, the effect gets stronger.

    Untitled
    // Enable the makeup look feature.
    // 1. Enable the feature, and pass the path of the corresponding makeup look resource.
    mEffects.setMakeup("/xxx/xxx/makeupdir/makeupdir_cutie_and_cool.bundle");
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsMakeupParam param = new ZegoEffectsMakeupParam();
    param.intensity = 100;
    mEffects.setMakeupParam(param);
    
    1
    Copied!

Remove the makeup looks

To remove the colored eye contacts, call the setMakeup method with the path parameter set to nil.

Untitled
// Remove the makeup looks.
mEffects.setMakeup(null);
1
Copied!

Previous

Shape Retouch

Next

Background Segmentation