I am developing an Photo application and i uses android GPUImageView for image edit. I want to use multiple filter. the xml portion is like
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<jp.co.cyberagent.android.gpuimage.GPUImageView
android:id="@+id/gpuimage"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY" />
<SeekBar
android:id="@+id/seekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:max="100" />
</FrameLayout>
If i use Brightness filter, change value using seekbar and show the preview at a time than next time how can i use sharpness filter on the filtered image. I set bitmap of my photo as
mGPUImageView.setImage(bitmapPhoto).
After using the filtering, get photo bitmap as
Bitmap bitmapSharpness = mGPUImageView.getGPUImage().getBitmapWithFilterApplied();
But problem is if i wanted to set the bitmapSharpness to GPUImageView the filtered color is distorted.
mGPUImageView.setImage(bitmapSharpness);
ie. sharpness preview filtered color and than again setTmage to mGPUImageView color is not same. What is the problem??
I had been suffering from the same problem but don't get any solution anywhere and I don't know why the git owner doesn't solve this issue but I found another way of setting the image in GPUImageView and here is the solution
I have created GPUImageView without preview and every time when I need to change the Image I just remove the old gpuImageView and create a new one like this
I hope this will be helpful. here is the link to the git issue and my solution -> https://github.com/cats-oss/android-gpuimage/issues/381