Skip to content Skip to sidebar Skip to footer

How To Make A Crop Camera View On Surfaceview Android

I want to create an cropping application using surfaceview on the android operating system. I've made ​​a display surface for displaying direct view camera, but I still fails w

Solution 1:

Check this tutorial. Displays a camera preview and a custom view than can define your region to be cropped, by dragging. You can modify it according to your needs. The only problems I could find are with orientation of the screen, that modify the preview, and of the resulting image.

http://adblogcat.com/a-camera-preview-with-a-bounding-box-like-google-goggles/

Solution 2:

you need to save the bitmap picture before crop.

croppedBitmap = Bitmap.createBitmap(cameraBitmap, x,y, cameraBitmap.getWidth(), cameraBitmap.getHeight());

after you just overwrite to the same path of your original picture

Post a Comment for "How To Make A Crop Camera View On Surfaceview Android"