Error "Invalid Parameter" fom ImageMagick convert on Windows Error "Invalid Parameter" fom ImageMagick convert on Windows asp.net asp.net

Error "Invalid Parameter" fom ImageMagick convert on Windows


convert is also the name of a windows executable which converts FAT filesystem to NTFS. When you do not specify the full path of an executable, quote:

...the system first searches the current working directory and then searches the path environment variable, examining each directory from left to right, looking for an executable filename that matches the command name given.

"C:\Windows\System32" is generally present in the beginning of %PATH% variable, causing the Windows convert utility to launch, which fails with "Invalid Parameter" error as expected.

Try specifying the full path of the ImageMagick's convert.exe like so:

"C:\Program Files\ImageMagick\convert.exe" -density 96x96 "path_and_filename.pdf" "path_and_filename.png"


As others have stated convert points to a different program in your PATH. Instead preface your command with magick. So your command would instead be:

magick convert -density 96x96 "[FileNameAndPath].pdf" "[FileNameAndPath].png"


In Window actually exists a "convert.exe" in system32 - make sure your script doesn't start that one (maybe the environment paths on your development machine are set differently).