I am using ImageMagick in a programming environment using Magick++. I want to know how ImageMagick finds decode delegates for an image format. It appears as if this information should be in coder.xml. But I see nothing there to tell ImageMagick how an image format delegate's DLL is specified. Would somebody please enlighten me on this ?
When I look at the DLLs I have built they have no dependencies, as seen in Dependency Walker to the decode delegates. So evidently they are being loaded at run-time, and their name must be known somehow. Bu there are no names of DLLs which I see in any of the XML configuration files.
I have run into a "No decode delegate for this image format" for a JPG file, and yet I have the versions of the decode delegate's for the JPG format in the same directory on the PATH as my other ImageMagick DLLs.
Finding decode delegates
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Finding decode delegates
This is complex. IM used a delegate file of external conversion programs, as well as individual coder DLL's to read in and write out images. In what order or the exact processing deatil is not well known as basically, it works..
I have some information on delegates in IM Examples, Image File Handling.
http://www.imagemagick.org/Usage/files/#delegates
I have some information on delegates in IM Examples, Image File Handling.
http://www.imagemagick.org/Usage/files/#delegates
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Finding decode delegates
If I receive a "No decode delegate for this image format" I need to know what ImageMagick is not finding and why. Saying that it is complex and it works.. does not help me to solve my problem, because it is not working for me. So I can only ask again how ImageMagick knows what DLL to load at run-time for a delegate or coder for a particular image format ? There must be some means by which ImageMagick knows the name of the delegate or coder to load.anthony wrote:This is complex. IM used a delegate file of external conversion programs, as well as individual coder DLL's to read in and write out images. In what order or the exact processing deatil is not well known as basically, it works..
I have some information on delegates in IM Examples, Image File Handling.
http://www.imagemagick.org/Usage/files/#delegates
In my case the image format is JPEG and I definitely have built CORE_RL_jp2_.dll, CORE_RL_jpeg_.dll, IM_MOD_RL_jp2_.dll, and IM_MOD_RL_jpeg_.dll for my compiler.
Perhaps I am not telling ImageMagick where to look for these files. They are in my PATH and yet I still received the above message. Furthermore if I build and use the debug versions of ImageMagick, and the debug versions of the particular files above, how does ImageMagick know to load the debug version names ( CORE_DB_jp2_.dll etc. ) instead of the release version names ?
Re: Finding decode delegates
See http://www.imagemagick.org/script/resources.php for the search path ImageMagick uses to find its coders and configuration files. It also briefly talks about the MAGICK_DEBUG environment variable which you can set to track where ImageMagick is looking for its files.
Re: Finding decode delegates
Thanks for the link.magick wrote:See http://www.imagemagick.org/script/resources.php for the search path ImageMagick uses to find its coders and configuration files. It also briefly talks about the MAGICK_DEBUG environment variable which you can set to track where ImageMagick is looking for its files.
My problem is that I am using IM from a DLL attached to a web server, and the web server is definitely not executing in the directory of the DLL. I have moved all the necessary IM DLLs in the same web server directory as my own DLL. The documentation on finding the coders and delegates makes it seem that IM will not find these DLLs even if they are in the same directory as my DLL, which seem a bit strange to me. Instead, to get IM to find these coders/delegates I have to set the MAGICK_CODER_MODULE_PATH environment variable.