I have a custom camera app which have a centered rectangle view, as you can see below: When I take a picture I want to ignore everything outside the rectangle. The view hasn’t any connection with the Camera Preview or SurfaceView in my XML view, as follows: Can somebody help me how to crop the image properly? I tried to
Tag: crop
Crop image to smallest size by removing transparent pixels in java
I have a sprite sheet which has each image centered in a 32×32 cell. The actual images are not 32×32, but slightly smaller. What I’d like to do is take a cell and crop the transparent pixels so the image is as small as it can be. How would I do that in Java (JDK 6)? Here is an example