AI Effects
  • iOS : Objective-C
  • Android
  • Overview
  • Release notes
  • SDK downloads
  • Demo app
  • Sample codes
  • Getting started
    • Integrate the SDK
    • Import resources and models
    • Online authentication
    • Implement basic image processing
  • Guides
    • Face beautification
    • Face shape retouch
    • Beauty makeups
    • Background segmentation
    • Face detection
    • Stickers
    • Filters
  • Tutorials
  • Error codes
  • Documentation
  • AI Effects
  • Guides
  • Beauty makeups

Beauty makeups

Last updated:2022-07-29 11:49

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.
  • 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.
```objc
// Enable the eyeliner feature.
// 1. Enable the feature, and pass the path of the eyeliner resource. 
[self.effects setEyeliner:@"/xxx/xxx/eyelinerdir/eyelinerdir_natural.bundle"];

// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyelinerParam* param = [[ZegoEffectsEyelinerParam alloc] init];
param.intensity = 100;
[self.effects setEyelinerParam:param];
```

Remove the eyeliner

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

```objc
// Remove the eyeliner.
[self.effects setEyeliner:nil];
```

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.

    // Enable the eyeshadow feature.
    // 1. Enable the feature, and pass the path of the eyeshadow resource. 
    [self.effects setEyeshadow:@"/xxx/xxx/eyeshadowdir/eyeshadowdir_mist_pink.bundle"];
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsEyeshadowParam* param = [[ZegoEffectsEyeshadowParam alloc] init];
    param.intensity = 100;
    [self.effects setEyeshadowParam:param];

Remove the eyeshadow

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

```objc
// Remove the eyeshadow.
[self.effects setEyeshadow:nil];
```

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.
```objc
// Enable the eyelashes feature.
// 1. Enable the feature, and pass the path of the eyelashes resource. 
[self.effects setEyelashes:@"/xxx/xxx/eyelashesdir/eyelashesdir_bushy.bundle"];

// 2. Set the intensity, value range [0, 100].
ZegoEffectsEyelashesParam* param = [[ZegoEffectsEyelashesParam alloc] init];
param.intensity = 100;
[self.effects setEyelashesParam:param];
```

Remove the eyelashes

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

```objc
// Remove the eyelashes.
[self.effects setEyelashes:nil];
```

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.

    // Enable the blusher feature.
    // 1. Enable the feature, and pass the path of the blusher resource.
    [self.effects setBlusher:@"/xxx/xxx/blusherdir/blusherdir_apricot_pink.bundle"];
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsBlusherParam* param = [[ZegoEffectsBlusherParam alloc] init];
    param.intensity = 100;
    [self.effects setBlusherParam:param];

Remove the blusher

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

```objc
// Remove the blusher.
[self.effects setBlusher:nil];
```

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.
```objc
// Enable the lipstick feature.
// 1. Enable the feature, and pass the path of the lipstick resource.
[self.effects setLipStick:@"/xxx/xxx/lipstickdir/lipstickdir_bean_paste_pink.bundle"];

// 2. Set the intensity, value range [0, 100].
ZegoEffectsLipstickParam* param = [[ZegoEffectsLipstickParam alloc] init];
param.intensity = 100;
[self.effects setLipstickParam:param];
```

Remove the lipstick

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

```objc
// Remove the lipstick.
[self.effects setLipStick:nil];
```

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.

    // Enable the colored contacts feature.
    // 1. Enable the feature, and pass the path of the colored eye contacts resource.
    [self.effects setColoredcontacts:@"/xxx/xxx/coloredcontactsdir/coloredcontactsdir_chocolate_brown.bundle"];
    
    // 2. Set the intensity, value range [0, 100].
    ZegoEffectsColoredcontactsParam* param = [[ZegoEffectsColoredcontactsParam alloc] init];
    param.intensity = 100;
    [self.effects setColoredcontactsParam:param];

Remove the colored eye contacts

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

```objc
// Remove the colored eye contacts.
[self.effects setColoredcontacts:nil];
```

Makeup looks

You can't superimpose the makeup looks and stickers. Once you apply a makeup look, the sticker 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.
```objc
// Enable the makeup look feature.
// 1. Enable the feature, and pass the path of the corresponding makeup look resource.
[self.effects setMakeup:@"/xxx/xxx/makeupdir/makeupdir_cutie_and_cool.bundle"];

// 2. Set the intensity, value range [0, 100].
ZegoEffectsMakeupParam* param = [[ZegoEffectsMakeupParam alloc] init];
param.intensity = 100;
[self.effects setMakeupParam:param];
```

Remove the makeup looks

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

```objc
// Remove the makeup looks.
[self.effects setMakeup:nil];
```
Page Directory