Scale images correctly.