resize image gravity center +repage

Jul 28, 2014 at 12:48 PM
hi, how to do the following conversion?
Convert.exe -resize 240x320^ -gravity center +repage Source.gif Output.gif

Above command basically resize the image (may lose in aspect ratio) crops its from centre.
Jul 28, 2014 at 1:54 PM
The -gravity center option is ignored by the -resize option. Your command translates to this:
using (MagickImageCollection images = new MagickImageCollection("Source.gif"))
  foreach (MagickImage image in images)
    image.Resize(new MagickGeometry("240x320^"));

Jul 29, 2014 at 6:52 AM
thank you for the reply. will try the same and come back.