added scaling of bitmap data