added bitmap scale function