Image sample I have this method written for cropping my image, but HEIGHT dimension doesnt work on the cropping, only weight is done right. I cant find the issue. I want to use my screen width and height as a dynamic width and height.
public Bitmap cropToSquare(Bitmap bitmap){
int width = mScreenWidth ;
int height = mScreenHeight;
int newWidth = width - 2 * 10;
int newHeight = (height- newWidth) / 2;
Bitmap cropImg = Bitmap.createBitmap(bitmap, 0, 0, newWidth, newHeight);
return cropImg; }
}