minor mod to use scalefactor rather than maxheight for the sizing of images