I am trying to use this command for ImageMagick:

convert "c:\users\****\My Documents\test.png"  -transparent white   test2.png

However, I keep on getting two errors that look like this:

convert.exe: unable to open image `c:\users\****\My':  
 No such file or directory @ error/blob.c/OpenBlob/2641.

convert.exe: no decode delegate for this image format `c:\users\****\My' 
 @ error/constitute.c/ReadImage/550.

I installed ImageMagick to my c:\ directory.

What does this mean, and how can I fix it?

  • 1
    You've used quotes around the path to the source image, so no idea why it's breaking off at "My". Try navigating to C:\Users\****\My Documents, from there run as C:\Convert.exe test.png -transparent white test2.png and see if it works. – Karan Jan 3 '13 at 22:14
  • I did this: cd C:\Users\****\My Documents Then I ran: c:\convert.exe test.png -transparent white test2.png But I got this error: 'c:\convert.exe' is not recognized as an internal or external command, operable program or batch file. So I tried: 'c:\ImageMagick-6.8.1-Q16\convert.exe pin.png -transparent white test2.png' Then I got: convert.exe: Improper image header pin.png' @ error/png.c/ReadPNGImage/3699. convert.exe: no images defined test2.png' @ error/convert.c/ConvertImageCommand /3066. – Gkhan14 Jan 3 '13 at 22:23
  • 'c:\convert.exe' is not recognized as an internal or external command, operable program or batch file. - Well that's because Convert.exe is not in C:\ but in C:\ImageMagick-6.8.1-Q16 (you need to specify the proper path obviously). As for the "Improper image header" error, you seem to have an image that convert.exe cannot read for some reason (corrupted, perhaps?) – Karan Jan 3 '13 at 22:26
  • Hmm, I just found out that I installed the 32 bit version on my 64 bit computer, could that be the problem? – Gkhan14 Jan 3 '13 at 22:29
  • 1
    So what worked? Another source image, or you had specified some argument incorrectly earlier and corrected it? – Karan Jan 3 '13 at 22:44

Sure looks like the space between My and Documents is being used as an argument separator by the convert program.

Not being a windows guru, I'm not sure how you'd escape the space.

Being practical, I'd say to move test.png to a directory string that contains no special characters and then running convert on it.

  • You escape the space by using quotes, which he seems to have done. I haven't used convert.exe in a long time, but a proper Windows program should have no problems understanding quoted paths. Perhaps it's a bug. – Karan Jan 3 '13 at 22:16

Not a Windows expert, but the truncation that results in this c:\users\****\My looks like a basic character escaping issue that I see in Linux/Unix/Mac OS X when I attempt similar things. Try escaping the space like this:

convert c:\users\****\My^ Documents\test.png  -transparent white   test2.png

Note the ^ to escape the space.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.