Page 1 of 1
Problem when run convert in bat-file
Posted: 2013-10-14T04:47:49-07:00
by keoe
I run ImageMagick version 6.8.7 on Windows 7.
When I run
Code: Select all
convert C:\Photo.jpg -thumbnail 150x100^^ -gravity center -crop 150x100+0+0 +repage -format jpg -quality 75 C:\thumbs\Photo_thumb.jpg
i the command promt, it's work fine. When I try to run this in a bat-fil I get the following message: Invalid parameter - -thumbnail.
Does anyone know what's wrong?
Re: Problem when run convert in bat-file
Posted: 2013-10-14T06:02:20-07:00
by snibgo
"Invalid parameter - -thumbnail" is a message from the Windows utility "convert.exe", not the ImageMagick "convert.exe". You are calling the wrong program.
You can either:
- change your path enviroment variable so the IM path is before the Windows path
- rename IM convert.exe to, for example, imconvert.exe
- call convert.exe with a full path.
Re: Problem when run convert in bat-file
Posted: 2013-10-14T23:12:53-07:00
by keoe
snibgo wrote:"Invalid parameter - -thumbnail" is a message from the Windows utility "convert.exe", not the ImageMagick "convert.exe". You are calling the wrong program.
You can either:
- change your path enviroment variable so the IM path is before the Windows path
- rename IM convert.exe to, for example, imconvert.exe
- call convert.exe with a full path.
Thank you! That solve my problem