Question

I'm receiving a MagickDelegateErrorException when trying to perform this action:

 public static Image LoadEps(HttpPostedFileBase file)
 {
      MagickReadSettings settings = new MagickReadSettings();
      settings.ColorSpace = ColorSpace.RGB;
      settings.Density = new MagickGeometry(300, 300);

      using (MagickImage image = new MagickImage())
      {
          image.AddProfile(ColorProfile.SRGB);
          image.Read(file.InputStream, settings);
          return (Image)image.ToBitmap();
      }
 }

The exception message is cryptic:

Magick: Postscript delegate failed `C:/some/directory/AppData/Local/Temp/magick-14256CekyegnNSk1p': No such file or directory @ error/ps.c/ReadPSImage/840

I've done some googling on this and there are several mentions of GhostScript, but as I understand through Magick documentation, this should work without dependencies other than the Visual C++ libraries.

Thanks for any help

Was it helpful?

Solution

You do need to install Ghostscript if you want to use Magick.NET to convert EPS files. You can download the installation files from here: http://www.ghostscript.com/download/gsdnld.html. Make sure you install the version of GhostScript with the same platform. If you use the 64-bit version of Magick.NET you should also install the 64-bit version of Ghostscript. You can use the 32-bit version together with the 64-version but you will get a better performance if you keep the platforms the same.

The documentation has been changed to explain this better.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top