Errors from convert when IM invoked from IDL
Posted: 2014-02-26T15:59:22-07:00
I am not sure that I have the correct forum, if not, I apologize. If nothing else, I'm hoping someone can help me interpret the error messages I'm seeing and perhaps point me to the correct place to discuss them and correct the problem.
I have IM6.8.8.4-1 running on a Macintosh under OSX10.8.5. I also have ghostscript9.10 installed. I am trying to convert a postscript file to a png file from within IDLv8.2.3 (a MATLAB-like programming language). IDL has a SPAWN command that passes its argument to the shell for execution. For instance:
IDL> SPAWN, 'convert --version'
Version: ImageMagick 6.8.8-4 Q16 x86_64 2014-02-26 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC HDRI Modules
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms ltdl lzma openexr png rsvg tiff webp wmf x xml zlib
However,
IDL> SPAWN, 'convert newtest.ps newtest3.png' results in
convert-Q16: bad parameters to zlib `/var/tmp/magick-80233e81viV9KI1RG1' @ error/png.c/MagickPNGErrorHandler/1804.
convert-Q16: corrupt image `/var/tmp/magick-80233e81viV9KI1RG1' @ error/png.c/ReadPNGImage/4074.
convert-Q16: Postscript delegate failed `newtest.ps': No such file or directory @ error/ps.c/ReadPSImage/837.
convert-Q16: no images defined `newtest3.png' @ error/convert.c/ConvertImageCommand/3147.
When run directly from the shell, convert works exactly as expected.
bash-3.2$ convert newtest.ps newtest2.png
bash-3.2$
Is there anything in the error message that would help me understand why the IM is failing when invoked from IDL?
Thank you.
I have IM6.8.8.4-1 running on a Macintosh under OSX10.8.5. I also have ghostscript9.10 installed. I am trying to convert a postscript file to a png file from within IDLv8.2.3 (a MATLAB-like programming language). IDL has a SPAWN command that passes its argument to the shell for execution. For instance:
IDL> SPAWN, 'convert --version'
Version: ImageMagick 6.8.8-4 Q16 x86_64 2014-02-26 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC HDRI Modules
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms ltdl lzma openexr png rsvg tiff webp wmf x xml zlib
However,
IDL> SPAWN, 'convert newtest.ps newtest3.png' results in
convert-Q16: bad parameters to zlib `/var/tmp/magick-80233e81viV9KI1RG1' @ error/png.c/MagickPNGErrorHandler/1804.
convert-Q16: corrupt image `/var/tmp/magick-80233e81viV9KI1RG1' @ error/png.c/ReadPNGImage/4074.
convert-Q16: Postscript delegate failed `newtest.ps': No such file or directory @ error/ps.c/ReadPSImage/837.
convert-Q16: no images defined `newtest3.png' @ error/convert.c/ConvertImageCommand/3147.
When run directly from the shell, convert works exactly as expected.
bash-3.2$ convert newtest.ps newtest2.png
bash-3.2$
Is there anything in the error message that would help me understand why the IM is failing when invoked from IDL?
Thank you.