Java Code Examples for jp.co.cyberagent.android.gpuimage.GPUImage#getBitmapWithFilterApplied()
The following examples show how to use
jp.co.cyberagent.android.gpuimage.GPUImage#getBitmapWithFilterApplied() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GPUFilterUtils.java From DevUtils with Apache License 2.0 | 5 votes |
/** * 获取滤镜后的 Bitmap * @param gpuImage {@link GPUImage} * @param gpuImageFilter {@link GPUImageFilter} * @return 滤镜后的 Bitmap */ public static Bitmap getFilterBitmap(GPUImage gpuImage, GPUImageFilter gpuImageFilter) { if (gpuImage != null && gpuImageFilter != null) { gpuImage.setFilter(gpuImageFilter); return gpuImage.getBitmapWithFilterApplied(); } return null; }
Example 2
Source File: GPUFilterUtils.java From DevUtils with Apache License 2.0 | 5 votes |
/** * 获取滤镜后的 Bitmap * @param bitmap {@link Bitmap} * @param gpuImageFilter {@link GPUImageFilter} * @return 滤镜后的 Bitmap */ public static Bitmap getFilterBitmap(Bitmap bitmap, GPUImageFilter gpuImageFilter) { if (bitmap != null && gpuImageFilter != null) { GPUImage gpuImage = new GPUImage(DevUtils.getContext()); gpuImage.setImage(bitmap); gpuImage.setFilter(gpuImageFilter); return gpuImage.getBitmapWithFilterApplied(); } return null; }
Example 3
Source File: GPUFilterUtils.java From DevUtils with Apache License 2.0 | 5 votes |
/** * 获取滤镜后的 Bitmap * @param gpuImage {@link GPUImage} * @param bitmap {@link Bitmap} * @param gpuImageFilter {@link GPUImageFilter} * @return 滤镜后的 Bitmap */ public static Bitmap getFilterBitmap(GPUImage gpuImage, Bitmap bitmap, GPUImageFilter gpuImageFilter) { if (gpuImage != null && bitmap != null && gpuImageFilter != null) { gpuImage.setImage(bitmap); gpuImage.setFilter(gpuImageFilter); return gpuImage.getBitmapWithFilterApplied(); } return null; }
Example 4
Source File: GPUFilterPostprocessor.java From FrescoUtils with Apache License 2.0 | 5 votes |
@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); }
Example 5
Source File: GPUFilterTransformation.java From glide-transformations with Apache License 2.0 | 5 votes |
@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(); }
Example 6
Source File: GPUFilterPostprocessor.java From fresco-processors with Apache License 2.0 | 5 votes |
@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); }
Example 7
Source File: GPUFilterTransformation.java From picasso-transformations with Apache License 2.0 | 5 votes |
@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; }