本文整理汇总了Java中jp.co.cyberagent.android.gpuimage.GPUImage.setImage方法的典型用法代码示例。如果您正苦于以下问题:Java GPUImage.setImage方法的具体用法?Java GPUImage.setImage怎么用?Java GPUImage.setImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jp.co.cyberagent.android.gpuimage.GPUImage
的用法示例。
在下文中一共展示了GPUImage.setImage方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: onFilterClick
import jp.co.cyberagent.android.gpuimage.GPUImage; //导入方法依赖的package包/类
@Override public void onFilterClick(FilterModel filter) {
Bitmap bitmap = homeModel.getBitmap();
if (bitmap == null) {
homeModel.onError(homeModel.getContext().getString(R.string.no_image));
return;
}
GPUImage gpuFilter = getGpuImage();
gpuFilter.setImage(homeModel.getBitmap());
if (filter.isAdjustable()) {
gpuFilter.setFilter(filter.getFilter());
helper = new FilterAdjuster(filter.getFilter());
homeModel.showSeekBar(helper);
} else {
gpuFilter.setFilter(filter.getFilter());
homeModel.hideSeekBar();
}
homeModel.onFilterApplied(gpuFilter.getBitmapWithFilterApplied());
}
示例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: 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();
}
示例7: 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();
}
示例8: 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();
}
示例9: 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();
}