多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
如有需要,调用MHBeautyManager里面的相关接口设置美颜参数,参数列表如下: | 分类 | 功能 |对应函数 |参数范围 | | --- | --- | --- | --- | | 美颜 | 美白 | setSkinWhiting(int progress)| progress: [0,9]| | 美颜 | 磨皮 |setSkinSmooth(int progress)|progress: [0,9]| | 美颜 | 红润 |setSkinTenderness(int progress)|progress: [0,9]| |美颜|亮度|setBrightness(int progress)|progress: [0,100 ]| |美型|大眼|setBigEye(int progress)|progress: [0,100]| |美型|瘦脸|setFaceLift(int progress)|progress: [0,100]| |美型|嘴型|setMouseLift(int progress)|progress: [0,100]| |美型|瘦鼻|setNoseLift(int progress)|progress: [0,100]| |美型|下巴|setChinLift(int progress)|progress: [0,100]| |美型|额头|setForeheadLift(int progress)|progress: [0,100]| |美型|眉毛|setEyeBrow(int progress)|progress: [0,100]| |美型|眼角|setEyeCorner(int progress)|progress: [0,100]| |美型|眼距|setEyeLength(int progress)|progress: [0,100]| |美型|开眼角|setEyeAlat(int progress)|progress: [0,100]| |美型|削脸|setFaceShave(int progress)|progress: [0,100]| |美型|长鼻|setLengthenNoseLift(int progress)|progress: [0,100]| |贴纸|贴纸|setSticker( final String stickerName, final int action, final boolean show,final boolean isAction,final String key)|stickerName:动作贴纸名称(使用前需要先获取动作贴纸列表 然后下载动作贴纸) , action 动作id(0 //无 1 // 抬头 2 //张嘴 3 //眨眼),show 是否显示,isAction 是否为动作贴纸,key贴纸分类标识MHConfigConstants.TIE_ZHI_1//基础贴纸_2//高级贴纸_3//基础面具_4//高级面具| |滤镜|滤镜|setFilter(final int filterId);|filterId:滤镜资源id| |特效 ||setSpeciallyEffect(String speciallyName )|speciallyName 特效名称 | |哈哈镜 ||setDistortionEffect(final int distortionName, final boolean isTeXiao)|distortionName 哈哈镜名称 isTeXiao:是否为特效里的哈哈镜| |水印 ||setWatermark(Bitmap bitmap, WaterAlignEnum waterAlignEnum)|Bitmap 水印切图,waterAlignEnum 水印显示位置(屏幕四角)| |动作贴纸|2.4.3以后版本生效|setSticker( final String stickerName, final int action, final boolean show,final boolean isAction,final String key)|stickerName:动作贴纸名称(使用前需要先获取动作贴纸列表 然后下载动作贴纸) , action 动作id(0 //无 1 // 抬头 2 //张嘴 3 //眨眼),show 是否显示,isAction 是否为动作贴纸,key贴纸分类标识MHConfigConstants.TIE_ZHI_1//基础贴纸_2//高级贴纸_3//基础面具_4//高级面具 | |美妆 |2.4.5以后版本生效|setMakeup(int makeupId,boolean enable)|makeupId 美妆类型id(MHSDK.MAKEUP_NONE //无 MHSDK.MAKEUP_LIPSTICK //唇彩 MHSDK.MAKEUP_EYELASH //睫毛 MHSDK.MAKEUP_BLUSH //腮红),enable 是否开启| 说明:大眼、瘦脸、嘴型、鼻型、下巴、额头是基础和高级版本都可以用,其余美型只能在高级版本才能使用。 *混淆(confuse)* ``` -keep class com.meihu.**{*;}* ``` If necessary, call the relevant interface in MHBeautyManager to set the beauty parameters, the parameter list is as follows: |classification |function | corresponding to the function| parameters | | --- | --- | --- | --- | | beauty | Whitening | setSkinWhiting(int progress)| progress: [0,9]| | beauty | buffing |setSkinSmooth(int progress)|progress: [0,9]| | beauty | ruddy |setSkinTenderness(int progress)|progress: [0,9]| |beauty|luminance|setBrightness(int progress)|progress: [0,100 ]| |beautiful type|Big eye|setBigEye(int progress)|progress: [0,100]| |beautiful type|thin face|setFaceLift(int progress)|progress: [0,100]| |beautiful type|mouth|setMouseLift(int progress)|progress: [0,100]| |beautiful type|Thin nasal|setNoseLift(int progress)|progress: [0,100]| |beautiful type|jaw|setChinLift(int progress)|progress: [0,100]| |beautiful type|forehead|setForeheadLift(int progress)|progress: [0,100]| |beautiful type|eyebrow|setEyeBrow(int progress)|progress: [0,100]| |beautiful type|Canthus|setEyeCorner(int progress)|progress: [0,100]| |beautiful type|Eyes distance|setEyeLength(int progress)|progress: [0,100]| |beautiful type|open canthus|setEyeAlat(int progress)|progress: [0,100]| |beautiful type|Cutting face|setFaceShave(int progress)|progress: [0,100]| |beautiful type| Extended nose|setLengthenNoseLift(int progress)|progress: [0,100]| |sticker|sticker|setSticker( final String stickerName, final int action, final boolean show,final boolean isAction,final String key)|stickerName:Action sticker name (obtain action sticker list and download action sticker before using), Action action ID (0 // none 1 // head up 2 // open mouth 3 // blink), show whether display, isAction whether action sticker, MHConfigConstants.TIE\_ZHI\_1// Basic Sticker \_2// Advanced sticker \_3// Basic mask \_4// Advanced Mask| |filters|filters|setFilter(final int filterId);|filterId:filters id| |special effects ||setSpeciallyEffect(String speciallyName )|specially Name | |Distorting mirror & have spent | | setDistortionEffect (final int distortionName, final Boolean isTeXiao) | distortionName distorting mirror name isTeXiao: whether the distorting mirror for special effects| |Watermark & have spent | | setWatermark (Bitmap Bitmap, WaterAlignEnum WaterAlignEnum) | Bitmap watermark cut figure, WaterAlignEnum watermark display position (the corners of the screen)| |Effective action stickers | 2.4.3 later | setSticker (final String stickerName, final int the action, Final Boolean show, final Boolean isAction, final String key) | stickerName: action name stickers (need to obtain a list action stickers first before use And then download the stickers), Action Action ID (0 // none 1 // look up 2 // open mouth 3 // blink), show whether display, isAction whether action sticker, Key sticker classification identification MHConfigConstants. TIE\_ZHI\_1 based sticker \_2 / / / / advanced stickers based mask \_4 \_3 / / / / advanced mask | beauty makeup & have spent | | 2.4.5 later takes effect setMakeup (int makeupId, Boolean enable) | makeupId beauty makeup type id (MHSDK. MAKEUP\_NONE / / no MHSDK. MAKEUP\_LIPSTICK / / lip gloss MAKEUP\_BLUSH // mhsdk. MAKEUP\_BLUSH // eyelash), enable whether to enable| Description: Big eyes, thin face, mouth, nose, chin, forehead are basic and advanced versions can be used, the rest of the beauty can only be used in advanced versions.