added cropping function to bitmap