Error when converting CGM format to PNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ronnhu

Error when converting CGM format to PNG

Post by ronnhu »

when I convert a cgm file to png format with the following command:

Code: Select all

D:\tmp>convert -verbose source.cgm output.png
It reported an error:

Code: Select all

D:\tmp>convert -verbose source.cgm output.png
ralcgm -d ps "C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-PTybE2m2" "C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-YYkbDMSI" "C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-sKO5ozYp"     convert -concatenate C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-YYkbDMSI*.ps "C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-YYkbDMSI"

***FATAL ERROR: CGMmain [140] Cannot open file (Input file: C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-PTybE2m2.cgm)
convert: delegate failed `ralcgm -d ps "%i" "%o" "%u"     convert -concatenate %o*.ps "%o"' @ error/delegate.c/InvokeDelegate/1061.
convert: unable to open image `C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-7O-_Rj2D': No such file or directory @ error/blob.c/OpenBlob/2489.
convert: unable to open module file `d:\ronnfiles\ImageMagick-6.6.1-Q16-windows-dll\modules\coders\IM_MOD_RL_CGM_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/669.
convert: unable to open file `C:/DOCUME~1/ronn/LOCALS~1/Temp/magick-7O-_Rj2D': No such file or directory @ error/constitute.c/ReadImage/572.
convert: missing an image filename `output.png' @ error/convert.c/ConvertImageCommand/2970.
It seems like there is no 'IM_MOD_RL_CGM_.dll'. the dll file does not exist in 'ImageMagick-6.6.1-Q16-windows-dll' directory indeed.

I have already installed ralcgm (from page:http://technologytales.com/2009/11/24/c ... ostscript/).

I could first convert cgm format to ps format using ralcgm:

Code: Select all

command:D:\tmp>ralcgm -d ps -oC source.cgm source.ps
and then convert ps format to png using ImageMagick:

Code: Select all

D:\tmp>convert source.ps output.png
But cannot convert cgm to png directly.

Thanks for any help!

PS:
ImageMagick version: 6.6.1(download link:http://www.imagemagick.org/download/bin ... ws-dll.exe)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error when converting CGM format to PNG

Post by magick »

Edit delegates.xml and change the CGM delegate to
  • <delegate decode="cgm" thread-support="False" command="ralcgm -d ps "%i." "%o." "%u.""/>
ronnhu

Re: Error when converting CGM format to PNG

Post by ronnhu »

magick wrote:Edit delegates.xml and change the CGM delegate to
  • <delegate decode="cgm" thread-support="False" command="ralcgm -d ps "%i." "%o." "%u.""/>
Hi magick, the problem has been resolved and now I can convert cgm to png successfully with your help. Thanks a lot.
ImageMagick is a great software I really like it!
Post Reply