0

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.

0

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Windows path length limits are 128 characters? have you got a reference on that? Thanks for the advice about an imagemagick path length limit.
I have a reference to a 260-char limit.. including terminating NUL char. With a file-storage application I worked on IIRC we were aware of some limitations 128, so avoided very long paths -- but can't find a reference. msdn.microsoft.com/en-us/library/windows/desktop/…
Yep, looks like it is an internal path-length limitation. Thanks.
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.