setBeautifyValue method
Set the intensity of the specific face beautify feature Description: After the face beautify feature is enabled, you can specify the parameters to set the intensity of the specific feature as needed.
Call this method at: After enabling the face beautify feature.
@param value refers to the range value of the specific face beautification feature or face shape retouch feature. @param type refers to the specific face beautification feature or face shape retouch feature.
Implementation
void setBeautifyValue(int value, BeautyEffectType type) {
if (BeautyEffectType.none == type) {
return;
}
switch (type) {
case BeautyEffectType.whiten:
ZegoUIKitCore.shared.coreData.beautyParam.whitenIntensity = value;
break;
case BeautyEffectType.rosy:
ZegoUIKitCore.shared.coreData.beautyParam.rosyIntensity = value;
break;
case BeautyEffectType.smooth:
ZegoUIKitCore.shared.coreData.beautyParam.smoothIntensity = value;
break;
case BeautyEffectType.sharpen:
ZegoUIKitCore.shared.coreData.beautyParam.sharpenIntensity = value;
break;
case BeautyEffectType.none:
break;
}
ZegoLoggerService.logInfo(
'set beauty $type value: $value',
tag: 'uikit',
subTag: 'effect service',
);
ZegoExpressEngine.instance
.setEffectsBeautyParam(ZegoUIKitCore.shared.coreData.beautyParam);
}