Added code to resize image on Ubuntu