added image scaling ability