Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to override Windows' convert command by ImageMagick's one?

In Windows, a command called convert is used to convert the filesystems. When you type convert, it will ask you to specify a filesystem.

In ImageMagick, convert command is used for image processing.

The problem is, even after setting the environment variable for ImageMagick convert, the tool doesn't get invoked. It calls only the Windows convert command. How to override that?

like image 482
vettipayyan Avatar asked Dec 19 '10 04:12

vettipayyan


2 Answers

This is an old question, but the current solution with ImageMagick 7 is to use the "magick" command in place of "convert".

like image 147
Tom Robinson Avatar answered Oct 13 '22 19:10

Tom Robinson


This is an old question, but I encountered this problem today, and this is my solution in Windows 7.

Windows convert.exe is located in folder C:\Windows\System32, so you have to modify the Windows PATH variable by putting the ImageMagick path (for example C:\Libs\ImageMagick-6.8.8-4) before the path that loads System32 (ie. %SystemRoot%\System32).

This will cause all ImageMagick executables to take priority over any similarly named system executables, which should do what you want but may cause unexpected behaviour.

Also, when you want to use the system convert.exe, you'll have to specify the full pathname such as C:\Windows\System32\convert.exe.

like image 27
mgambella Avatar answered Oct 13 '22 20:10

mgambella