Add function 'resizeImage'