Search code examples
javaandroidgpuimageglsurfaceviewimagefilter

Rendering issue with glsurfaceview in GpuImage


Original image: before processing

Processed image on glsurfaceview: after processing

Java code:

mGPUImage = new GPUImage(this);
mGPUImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.editPicture));
mGPUImage.setImage(uri);

XML:

<android.opengl.GLSurfaceView
    android:id="@+id/editPicture"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Solution

  • Don't use

    gpuImage.setImage(URI)
    

    use

    gpuImage.setImage(Bitmap)