Page 1 of 1

convert Problems under Windows 7

Posted: 2012-11-05T02:11:44-07:00
by imusr
Dear Imagemagick experts,

I've got a problem with the following script under Windows 7

Code: Select all

@echo on
FOR /F %%I IN ('DIR *.jpg /b') DO (convert.exe %%I -resize 800x600 -auto-orient -density 72 -quality 75 c_%%I
composite -watermark 15%% -gravity center c:\imagebatch\pic.png c_%%I c_%%I)
I've start this script with a shell command under the context Menu in my Windows Explorer. I've added this under HKEYLM\SOftware\Classes\Directory\shell\Piccommand\command

-> the Reg ey C:\imagebatch\test.cmd

If you choose a folder with pictures and doing a right click on it, choose piccommand it always display the message file not found

after this I tried to add after the C:\imagebatch\test.cmd %1 and tried to run the script like this

Code: Select all

@echo on
FOR /%%I IN (%1\*.jpg) DO (convert.exe %%I -resize 800x600 -auto-orient -density 72 -quality 75 c_%%I
composite -watermark 15%% -gravity center c:\imagebatch\pic.png c_%%I c_%%I)
Now the script starts in the pointed directory but displays the message "improper parameter - - resize"

If I copy the original Script in the picture folder it works.

Has anyone of you a hint how to solve this Problem.

Greetings

Marc

Re: convert Problems under Windows 7

Posted: 2012-11-05T08:31:54-07:00
by el_supremo
Windows might be finding the system "convert.exe" command instead of the one for Imagemagick. Try changing the IM convert.exe to magick.exe and change it in the script as well.

Pete

Re: convert Problems under Windows 7

Posted: 2012-11-06T06:52:19-07:00
by imusr
Hey,

windows uses the right convert.exe, if I type "convert" manually in the commandline it works!

greetings

marc

Re: convert Problems under Windows 7

Posted: 2012-11-06T08:17:27-07:00
by el_supremo
That doesn't mean that the script is finding the same one. The error message you get about an invalid parameter "-resize" is exactly the message that is produced by the Windows convert program.
Try renaming the IM convert anyway.

Pete