I am making an application for influencing the image. I am using the GPUImageGroupFilter library from this link below
https://github.com/CyberAgent/android-gpuimage/tree/master/library/src/jp/co/cyberagent/android/gpuimage
Problem
I get the effect, but not in the correct position when I touch the image when I use this code below
@Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction(); int widtgimage1 = v.getWidth(); int hightimage1 = v.getHeight(); if (action == MotionEvent.ACTION_DOWN) { Log.e("touch", " Action Down call"); System.out.println(" ImageViewtest: widtgimage1 " + widtgimage1 + " hightimage1 :" + hightimage1); float newx1 = event.getX() / widtgimage1; float newy1 = event.getY() / hightimage1; GPUImageBulgeDistortionFilter mFilter = new GPUImageBulgeDistortionFilter(0.15f, 0.2f, new PointF(newx1, newy1)); filterGroup.addFilter(mFilter); mGPUMainImage.setFilter(filterGroup); return true; } else if (action == MotionEvent.ACTION_UP) { Log.e("touch", " Action Up call"); return false; } else if (action == MotionEvent.ACTION_MOVE) { Log.e("touch", " Action Move call"); return false; } }
source share