Page 1 of 1

No decode delegate for this image format 'CGM'

Posted: 2018-06-26T05:33:47-07:00
by Lantik
Hi there!
I need to convert file from CGM to PNG format and ImageMagic is the only free way I found and I installed it, using NuGet.

I know that I need to install RALCGM to read CGM files and I downloaded it from this site http://xd.chem.buffalo.edu/download.html
But even after installation it throws tha same mistake "no decode delegate for this image format"
I searched a lot and found out, that I need to add RALCGM to some PATH, but I have no idea how to do it.

I would be greatful if anybody told me how to install RALCGM properly to convert cgm files from Visual Studio.

Here is full text of Exception:

Code: Select all

ImageMagick.MagickMissingDelegateErrorException: no decode delegate for this image format `CGM' @ error/constitute.c/ReadImage/512
   в ImageMagick.NativeInstance.CheckException(IntPtr exception, IntPtr result)
   в ImageMagick.MagickImage.NativeMagickImage.ReadFile(MagickSettings settings)
   в ImageMagick.MagickImage.Read(String fileName, MagickReadSettings readSettings, Boolean ping)
   в ImageMagick.MagickImage..ctor(String fileName)
   в WindowsFormsAPI1.Form1.button1_Click(Object sender, EventArgs e) в F:\VisualStudio\Art of Unit Testing\WindowsFormsAPI1\WindowsFormsAPI1\Form1.cs:строка 26
   в System.Windows.Forms.Control.OnClick(EventArgs e)
   в System.Windows.Forms.Button.OnClick(EventArgs e)
   в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в System.Windows.Forms.ButtonBase.WndProc(Message& m)
   в System.Windows.Forms.Button.WndProc(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
P.S. Sorry for my English

Re: No decode delegate for this image format 'CGM'

Posted: 2018-06-26T13:14:00-07:00
by dlemstra
If you want to use ralcgm you will need to load your own delegates.xml (https://github.com/dlemstra/Magick.NET/ ... ization.md). But I have no idea what you will need to put in the delegates.xml file to get it working.