added image resampling using graphics magick