added function to resize the image
Added support for contrast