Hi - been in meetings all day. I did the following. Removed IM and ghostscript, upgraded zlib, reinstalled ghostscript and IM. This did not solve the problem.
Barry
Errors from convert when IM invoked from IDL
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Errors from convert when IM invoked from IDL
I think you need to discuss this with the IDL folks. If it works in the command line in a terminal, then I suspect IM is installed properly. How IDL talks to IM and to its delegates seems to be the issue.
I am kind of at a loss to know what else to suggest you try or check.
I am kind of at a loss to know what else to suggest you try or check.
Re: Errors from convert when IM invoked from IDL
Have you tried using the full path as suggested by Fred?
Code: Select all
// Not this
IDL> spawn, 'rose.png, rose.jpg'
// But this
IDL> spawn, '/path/to/folder/rose.png, /path/to/folder/rose.jpg'
Re: Errors from convert when IM invoked from IDL
Yes, I have tried that (specifying the full path). This still results in the error:
IDL> spawn, 'which convert'
/opt/local/bin/convert
IDL> spawn, '/opt/local/bin/convert newtest.ps newtest.png'
convert: bad parameters to zlib `/var/tmp/magick-66542TomB3yOF3WGb1' @ error/png.c/MagickPNGErrorHandler/1804.
convert: corrupt image `/var/tmp/magick-66542TomB3yOF3WGb1' @ error/png.c/ReadPNGImage/4074.
convert: Postscript delegate failed `newtest.ps': No such file or directory @ error/ps.c/ReadPSImage/837.
convert: no images defined `newtest.png' @ error/convert.c/ConvertImageCommand/3147.
Can anyone explain the original source of the error? Is it 'png.c'?
Barry
IDL> spawn, 'which convert'
/opt/local/bin/convert
IDL> spawn, '/opt/local/bin/convert newtest.ps newtest.png'
convert: bad parameters to zlib `/var/tmp/magick-66542TomB3yOF3WGb1' @ error/png.c/MagickPNGErrorHandler/1804.
convert: corrupt image `/var/tmp/magick-66542TomB3yOF3WGb1' @ error/png.c/ReadPNGImage/4074.
convert: Postscript delegate failed `newtest.ps': No such file or directory @ error/ps.c/ReadPSImage/837.
convert: no images defined `newtest.png' @ error/convert.c/ConvertImageCommand/3147.
Can anyone explain the original source of the error? Is it 'png.c'?
Barry
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Errors from convert when IM invoked from IDL
Can you verify that you do not have more than one copy of zlib, libpng and gslib on your system anywhere. If only one of each, then what versions of the delegates are they? Check with google to see if there are more current versions. Perhaps zlib and png are not at compatible versions.
According to MacPorts:
libpng 1.6.9
Library for manipulating PNG images
Maintained by: ryandesign
Categories: graphics
Platforms: darwin freebsd linux openbsd sunos
Dependencies: zlib
According to http://www.libpng.org/pub/png/libpng.html, this is the current version of libpng.
libpng is available as ANSI C (C89) source code and requires zlib 1.0.4 or later (1.2.5 or later recommended for performance and security reasons).
I have seen what appear to be similar looking problems, when one delegate or tool require one version of a dependency and onother delegate or tool required a different version of the dependency.
According to MacPorts:
libpng 1.6.9
Library for manipulating PNG images
Maintained by: ryandesign
Categories: graphics
Platforms: darwin freebsd linux openbsd sunos
Dependencies: zlib
According to http://www.libpng.org/pub/png/libpng.html, this is the current version of libpng.
libpng is available as ANSI C (C89) source code and requires zlib 1.0.4 or later (1.2.5 or later recommended for performance and security reasons).
I have seen what appear to be similar looking problems, when one delegate or tool require one version of a dependency and onother delegate or tool required a different version of the dependency.
Re: Errors from convert when IM invoked from IDL
OK - while the computer is searching, I can reply with certainty that zlib is 1.2.8 (installed this AM via MacPorts). I don't know offhand how to determine which version of gslib and pnglib I have installed. Still, if there were an incompatibility (or multiple versions) wouldn't it also show up when I invoked convert from the bash shell (outside of IDL)? Isn't there an IM command that has a delegates option? I need to look that up. Thanks, Barryu
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Errors from convert when IM invoked from IDL
My though is that IDL may have a built in zlib or libpng that is older than what IM wants to use and it is trying to force IM to use the IDL versions. This is just a guess. How old is your IDL version?
Have you contacted the IDL developers or asked questions on their forum about interfacing IDL with IM?
Have you contacted the IDL developers or asked questions on their forum about interfacing IDL with IM?
Re: Errors from convert when IM invoked from IDL
Hi - yes, I have posted queries on both the Google IDL group forum and on the Exelis IDL support forum - several people have offered suggestions but nothing has solved the problem. One other curious aspect of this is that the problem seems to be limited to IDL running on Macintosh; PC users don't seem to have any difficulty (or at least haven't reported any). My version of IDL is 8.2.3 which is very current, though Exelis recently released v8.3, but I'm not an "early adapter" and the release notes did not suggest that there were any bug fixes or features that would be of interest to me now. I feel the same way about going from MacOSX10.8.5 to 10.9. I'd just as soon wait. Thanks again for all you help with this. It certainly seems like its an IDL problem and that is the direction I'm going to focus on now. Barry
Re: Errors from convert when IM invoked from IDL
You were absolutely correct. Following up on your suggestion I found that IDL was using version 1.2.3 of zlib. The current version (installed with IM) is 1.2.8. I changed the symbolic links in the IDL library directory so IDL now uses 1.2.8 and everything works as expected.
THANK YOU!!!
THANK YOU!!!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Errors from convert when IM invoked from IDL
Glad to hear you finally got it solved. Congratulations!
Fred
Fred