No decode delegate for this image format 'CGM'

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Posts: 1
Joined: 2018-06-26T05:12:16-07:00
Authentication code: 1152

No decode delegate for this image format 'CGM'

Post 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
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

User avatar
Posts: 1625
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789

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

Post by dlemstra »

If you want to use ralcgm you will need to load your own delegates.xml ( ... But I have no idea what you will need to put in the delegates.xml file to get it working.
.NET + ImageMagick = Magick.NET, @MagickNET, Donate