added image scaling (see #11)