use of jp.co.cyberagent.lansongsdk.gpuimage.GPUImageLookupFilter in project LanSoEditor_advance by LanSoSdk.
the class BeautyManager method addBeauty.
/**
* 增加美颜
*
* @param camlayer
*/
public void addBeauty(CameraLayer camlayer) {
if (camlayer != null) {
isTuneBeauting = true;
ArrayList<GPUImageFilter> filters = new ArrayList<GPUImageFilter>();
beautyTuneFilter = new LanSongBeautyTuneFilter();
filters.add(beautyTuneFilter);
// 设置亮度;
camlayer.setBeautyBrightness(1);
String bmpStr = CopyFileFromAssets.copyAssets(mContext, "lansongbeauty.png");
if (bmpStr != null) {
mlookupFilter = new GPUImageLookupFilter(0.22f);
Bitmap bmp = BitmapFactory.decodeFile(bmpStr);
mlookupFilter.setBitmap(bmp);
filters.add(mlookupFilter);
} else {
Log.e(TAG, "无法获取lansongbeauty图片文件");
}
camlayer.switchFilterList(filters);
} else {
Log.e(TAG, "add beauty error. camlayer is null");
}
}
Aggregations