added resizing of the bitmap