2

How do i convert a eps file to System.Drawing.Image in C# i have tryed to use ImageMagickNET but that didn't work-.-

Kimtho6
  • 6,154
  • 9
  • 40
  • 56
  • what type of image? There are many types. e.g. System.Drawing.Image, System.Windows.Controls.Image, System.Windows.Forms.PictureBox to name just 3. There are far more. – Matt Ellen Nov 04 '10 at 09:08
  • You should change "esp file" to "eps file" to avoid confusion. – Simon Fischer Nov 04 '10 at 09:18
  • 1
    Hi Profeten, sorry for misreading your question the first time round. .EPS is a vector image, i.e. a description of lines shapes and text on an image. You need a library that can render or rasterize the EPS, it would be called a Vector to Raster converter. Sorry I can't suggest one, the best I could do is shell out to GhostScript. – Stephen Turner Nov 04 '10 at 09:21

1 Answers1

1

You already tried ImageMagickNET, so there also is ImageGlue, but it is a commercial solution you will have to pay for.

The long way is using Ghostscript. You can use Ghostscript to convert an EPS file to an image, so all you need is a C# wrapper for Ghostscript and throw the EPS at it.

You also might just want to look at third party programs just doing the conversion for you. E.g. IrfanView. It is free and could be scripted to take a EPS and convert it to something else.

Dennis G
  • 21,405
  • 19
  • 96
  • 133