fix getCroppedImage IllegalArgumentException