android-gpuimage
android-gpuimage copied to clipboard
GpuImage Group-filter
Please Give me a Solution how can i use GPUImage Filter Group in android. Because i have faced many more lots of problem for GpuImagegroup filters.please give me a complete solution or demo how to use group filter.
@axarlotwala
What your problem when using GPUImageFilterGroup
?
@axarlotwala What your problem when using
GPUImageFilterGroup
?
can you give me complete demo of how to use groupfilter with recyclerview . because i can search many more way but not find me a proper solution so please help me
I have not so that demo. Why do you want using the filter live in the ListView?
I have not so that demo. Why do you want using the filter live in the ListView?
because i have working with photo editing app i have require to use lots of filter so its best way to use list in filter so because if i am use single single on every effect describe in gpuimage its very boilerplate.will use maximum these 50 filter in app
@axarlotwala
I think you should create a thumbnail image corresponding to FilterGroup
show in ListView
instead use the live filter in each item of the ListView
.
I think you should create a thumbnail image corresponding to
FilterGroup
show inListView
instead use the live filter in each item of theListView
.
and how to define in list and apply also give me these problem solution ?
@axarlotwala
Corresponding with each FilterGroup
you should save it to a database, before load it into ListView
, create a thumbnail save to in disk, after using the Picasso
or Glide
load that thumbnail into ListView
.
You should not be using the live filter in the ListView. Because the memory will leak and very weight.
ok i will try these can you give me reference for similar libary for use many more filters
I unknow a similar library.
You can create many different effects yourself using the GPUImageToneCurveFilter
filter. First of all to use this class you need to create an effect for an image in Photoshop and then save it as a file with the .acv
extension.
Using
/ / take image
AssetManager as = getAssets();
InputStream is = null;
Bitmap bitmap = null;
try {
is = as.open("dog.jpg");
bitmap = BitmapFactory.decodeStream(is);
is.close();
} catch (IOException e) {
Log.e("MainActivity", "Error");
}
// Take ACV file and create Filter
GPUImageToneCurveFilter filter = new GPUImageToneCurveFilter();
try {
is = as.open("tone_curve.acv");
filter.setFromCurveFileInputStream(is);
is.close();
} catch (IOException e) {
Log.e("MainActivity", "Error");
}
// Image processing with GPUImage
GPUImage gpuImage = new GPUImage(self);
gpuImage.setImage(bitmap);
gpuImage.setFilter(filter);
bitmap = gpuImage.getBitmapWithFilterApplied();
//show in ImageView
ImageView view = new ImageView(self);
view.setImageBitmap(bitmap);
setContentView(view);
I want to apply multiple filters to an image. For the very first time, I can apply filters using GPUImageFilterGroup. Let's assume I am adding CONTRAST and BRIGHTNESS to the filter group, then I want to update CONTRAST, then switch to BRIGHTNESS and apply BRIGHTNESS change to the same image, to which I have already applied CONTRAST.
So, how can I increase or decrease the properties separately on the same image? Currently, for me, both properties are applied to the original image, not on filtering images.
Please assist.