How to make a crop camera view on SurfaceView Android

后端 未结 2 651
孤独总比滥情好
孤独总比滥情好 2021-02-06 18:54

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

2条回答
  •  温柔的废话
    2021-02-06 19:13

    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

提交回复
热议问题