本文整理汇总了Java中jp.co.cyberagent.android.gpuimage.GPUImage.getBitmapWithFilterApplied方法的典型用法代码示例。如果您正苦于以下问题:Java GPUImage.getBitmapWithFilterApplied方法的具体用法?Java GPUImage.getBitmapWithFilterApplied怎么用?Java GPUImage.getBitmapWithFilterApplied使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jp.co.cyberagent.android.gpuimage.GPUImage
的用法示例。
在下文中一共展示了GPUImage.getBitmapWithFilterApplied方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: transform
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override
public Resource<Bitmap> transform(Resource<Bitmap> resource, int outWidth, int outHeight) {
Bitmap source = resource.get();
GPUImage gpuImage = new GPUImage(mContext);
gpuImage.setImage(source);
gpuImage.setFilter(mFilter);
Bitmap bitmap = gpuImage.getBitmapWithFilterApplied();
return BitmapResource.obtain(bitmap, mBitmapPool);
}
示例2: filterPhoto
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
public static Bitmap filterPhoto(Context context, Bitmap bitmap, String key) {
if (bitmap == null) {
return null;
}
// 实现图片过滤处理
GPUImageFilter filter = null;
if (!TextUtils.isEmpty(key)) {
try {
filter = FILTERS.get(key).newInstance();
} catch (Exception e) {
}
}
if (filter != null) {
GPUImage gpuImage = new GPUImage(context);
gpuImage.setFilter(filter);
bitmap = gpuImage.getBitmapWithFilterApplied(bitmap);
gpuImage.deleteImage();
}
return bitmap;
}
示例3: transform
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override public Bitmap transform(Bitmap source) {
GPUImage gpuImage = new GPUImage(mContext);
gpuImage.setImage(source);
gpuImage.setFilter(mFilter);
Bitmap bitmap = gpuImage.getBitmapWithFilterApplied();
source.recycle();
return bitmap;
}
示例4: process
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override public void process(Bitmap dest, Bitmap source) {
GPUImage gpuImage = new GPUImage(context);
gpuImage.setImage(source);
gpuImage.setFilter(filter);
Bitmap bitmap = gpuImage.getBitmapWithFilterApplied();
super.process(dest, bitmap);
}
示例5: transform
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override protected Bitmap transform(@NonNull Context context, @NonNull BitmapPool pool,
@NonNull Bitmap toTransform, int outWidth, int outHeight) {
GPUImage gpuImage = new GPUImage(context);
gpuImage.setImage(toTransform);
gpuImage.setFilter(gpuImageFilter);
return gpuImage.getBitmapWithFilterApplied();
}
示例6: getBitmapWithFilterApplied
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
public Bitmap getBitmapWithFilterApplied(Bitmap originalBitmap,
Context context) {
GPUImage gpuImage = new GPUImage(context);
gpuImage.setFilter(mFilter);
return gpuImage.getBitmapWithFilterApplied(originalBitmap);
}
示例7: overlayBorder
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
public void overlayBorder (){
GPUImageAlphaBlendFilter border=new GPUImageAlphaBlendFilter(opacity);
Bitmap bm = BitmapFactory.decodeResource(getResources(),imageID);
border.setBitmap(bm);
GPUImage mGPUImage = new GPUImage(this);
mGPUImage.setFilter(border);
mGPUImage.setImage(bitmap);
bitmapresult=mGPUImage.getBitmapWithFilterApplied();
bm.recycle();
}
示例8: overLay4
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
public void overLay4(){
GPUImageLookupFilter overFilter= new GPUImageLookupFilter();
overFilter.setBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.lookupwildness));
GPUImage mGPUImage = new GPUImage(this);
mGPUImage.setFilter(overFilter);
mGPUImage.setImage(bitmap);
bitmapresult=mGPUImage.getBitmapWithFilterApplied();
}
示例9: overLay2
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
public void overLay2(){
GPUImageNashvilleFilter overFilter= new GPUImageNashvilleFilter(this);
GPUImage mGPUImage = new GPUImage(this);
mGPUImage.setFilter(overFilter);
mGPUImage.setImage(bitmap);
bitmapresult=mGPUImage.getBitmapWithFilterApplied();
}
示例10: overLay3
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
public void overLay3(){
GPUImageLordKelvinFilter overFilter= new GPUImageLordKelvinFilter(this);
GPUImage mGPUImage = new GPUImage(this);
mGPUImage.setFilter(overFilter);
mGPUImage.setImage(bitmap);
bitmapresult=mGPUImage.getBitmapWithFilterApplied();
}