RoryB
RoryB

Reputation: 1047

What's wrong with this imagemagick conversion command?

I'm trying to convert some files between jpg and png with imagemagick, but I keep getting an error: No such file or directory Obviously, I have checked to make sure that the file does exist. I was thinking it might be some kind of path length limit, but I'm getting the same problem in Windows and Linux.

The command is:

"C:\Program Files\ImageMagick-6.8.3-Q16\convert.exe" "C:\Tomcat 7\inst-jq\temp\WF\483f95bc-dcd7-405c-a04d-dc8fabbe79e2\eb19c8af-a5d8-4fba-a439-bc83351d2577\Export\4211a260-3565-4c82-be72-7a0ad8337956\content\William Shakespeare\William Shakespeare\The Complete Works\Oberon,Titania,Puck,Fairies_William_Blake_c1786.jpg" "C:\Tomcat 7\inst-jq\temp\WF\483f95bc-dcd7-405c-a04d-dc8fabbe79e2\eb19c8af-a5d8-4fba-a439-bc83351d2577\Store\e7256aee-ab8b-42e6-91a6-525c921679cf\content\William Shakespeare\William Shakespeare\The Complete Works\Oberon,Titania,Puck,Fairies_William_Blake_c1786.png"

Any suggestions as to what I'm missing would be great.

Upvotes: 0

Views: 221

Answers (2)

Thomas W
Thomas W

Reputation: 14164

I posit it to be an internal path-length limitation, in ImageMagick at least -- it's also running well past Windows limitations (128 or so chars).

C/C++ programs typically allocate a fixed buffer for filenames/ paths/ input - this would be very unlikely to exceed 256 chars.

You probably want to revisit the design of your file-system storage.

If you can run the conversion when the files are on a short path, that will confirm my answer as correct.

Upvotes: 2

Mike
Mike

Reputation: 1332

Any suggestions as to what I'm missing would be great.

  1. Try to avoid spaces in file names
  2. Try to avoid other characters like ,:; and so on

I guess ImageMagick might treat , as file separator.

Upvotes: 0

Related Questions