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 …