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
  • Stickers

Stickers

Last updated:2022-07-29 11:49

The ZegoEffects SDK provides various fun and interesting face stickers. With accurate facial keypoint detection and tracking, the stickers can be applied seamlessly to the face and special effects can be triggered by facial movements.

Prerequisites

Before you begin to use the SDK's stickers in your project, make sure you complete the following steps:

  1. Integrate the ZegoEffects SDK into your project. For details, see Integration.
  2. Implement the basic image processing functionality. For details, see Implementation.
  3. Import the resource file PendantResources.bundle. For details, see Import resources

Use a sticker

The SDK provides different types of stickers, including Animal, Clown, Deer, Dive, Facefilm, Girl, Rabbit, Watermelon, and more. You can choose to use any stickers as needed by specifying the corresponding sticker resource.

To use the sticker feature, import the resource file PendantResources first; otherwise, this feature can't take effect. For details, see Import resources and models.

  1. To apply a sticker, call the setPendant method with the path of the sticker resource passed to the path parameter.
  2. To remove a sticker, call the setPendant method with the path parameter set to nil.
  • You can't superimpose the effects of different stickers. Once you apply a new sticker, the previous one (if any) will be overridden.
  • You can't superimpose the stickers and makeup looks. Once you apply a sticker, the makeup look will be overridden.
// Apply a sticker.
[effects setPendant:@"/xxx/xxx/pendantBaby.bundle"];

// Remove a sticker.
[effects setPendant:nil];
Page Directory