ImageMagick scripts error when run from within Calibre
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
One of the many uses I have found for Calibre is storing batch (*.bat) scripts I have written. Typically, double clicking on a script in Calibre or using the V shortcut runs the batch script. However, whenever I run a batch script that uses an ImageMagick program (convert.exe, conjure.exe, etc.) via either of the methods above, I get an error message.
For instance, a batch file with the following single line of text:
start "" "C:\Windows\
I get the following error message:
convert.exe: unable to load module 'C:\Program Files (x86)\Calibre2\
convert.exe: no decode delegate for this image format 'PNG' @ error/constitute .c/ReadImage/501.
convert.exe: no images defined 'C:\Users\
If I select Calibre's "open containing folder" option and then run the batch file from the resulting Windows Explorer window, it works perfectly with no error. If I manually paste the batch's text into a command prompt, it works perfectly with no error. The only time there is an issue is when I run the batch file from within Calibre using one of the two methods outlined above.
I am using the latest Calibre version 2.8.0 as well as the latest ImageMagick version 6.8.9-10-Q16
Appreciate any help you can offer.
You will need to sanitize the various IMAGEMAGICK environment variables
that calibre sets (and which subprocesses launched from calibre will
inherit) in your batch script. IIRC, they are
MAGICK_HOME CONFIGURE_ PATH CODER_MODULE_ PATH FILTER_ MODULE_ PATH
MAGICK_
MAGICK_
MAGICK_
status fixreleased