Page 1 of 1

Error while Converting JPG to PNG with fuzz parameter

Posted: 2018-03-06T15:46:44-07:00
by alex_ig
Hi, I'm new to ImageMagic and have a very basic question but can't figure out the issue myself. I have a bunch of JPG images sitting in a folder and I need to apply a transparent background and make them PNG. Below is a command that I have in a BAT file:

for %%i in (*.jpg) do ( convert "%%i" -fuzz 5%% -transparent white "%%~ni.png" )

When I run that I'm getting this error:

Invalid Parameter - -fuzz

I would appreciate any help.

Thanks.

Re: Error while Converting JPG to PNG with fuzz parameter

Posted: 2018-03-06T16:25:18-07:00
by snibgo
"Invalid Parameter" means you are not running ImageMagick convert.exe, but a Microsoft Windows program with the same name.

Re: Error while Converting JPG to PNG with fuzz parameter

Posted: 2018-03-06T21:27:08-07:00
by alex_ig
Thanks for your help! I added a full path to the magick.exe and it works now.

Thanks again.