Reputation: 151
what im trying to do here is convert the .eps file to jpg
im using ImageMagick but the problem with this is i need to install Ghostscript.
is there a way to just provide the ghostscript dll to the imagemagick. so that the i dont need to install Ghostscript to the computer that are going to use my program?
this is my code
using (MagickImage image = new MagickImage("myeps.eps"))
{
image.Write("mjpgoutput.jpg");
}
Upvotes: 2
Views: 3459
Reputation: 8153
Your question was already answered in the documentation of Magick.NET (https://github.com/dlemstra/Magick.NET/blob/main/docs/Readme.md)
If you don't want to install Ghostscript on your machine you can copy gsdll32.dll/gsdl64.dll and gswin32c.exe/gswin64c.exe to your server and tell Magick.NET where the file is located with the code below.
MagickNET.SetGhostscriptDirectory(@"C:\MyProgram\Ghostscript");
Be aware that you need a license if you want to use Ghostscript commercially.
Upvotes: 4