added method to shrink a bitmap