Better emulation of ds9 image scaling. #171