Small optimisation in image quality scaling.