Improved image scaling