I have a problem where NetPBM breaks upon attempting to generate thumbnails for images whose filenames have spaces in them. This happens when I move images to the media/ folder and make 4images detect new images. Once they are succcessfully uploaded, the auto-thumbnail tells me that there was an error creating thumbnail. I know for a fact that it is the filename, because it only happens on files where there are spaces in the filename, and not for singleword or multiple_word (separated by underscore) filenames.
On the other hand, if I manually add images using the "Add Image" feature in the control panel, it automatically replaces spaces with underscores in the filenames while adding, and thus, avoids the problem. I'm thinking that code that does the same for the detect new images would work, but I'm not any good at php coding. Any help?
Here's the error log from Apache:
[error] PHP Warning: getimagesize: Unable to open './../data/media//' for reading. in c:\program files\apache group\apache\htdocs\gallery\includes\image_utils.php on line 160
c:\netpbm\jpegtopnm.exe: WRITING PPM FILE
c:\netpbm\pnmtojpeg.exe: Architecture.jpg - No such file or directory
c:\netpbm\jpegtopnm.exe: Too many arguments. The only argument accepted is the input file specificaton
c:\netpbm\pnmscale.exe: Error reading magic number from PBM file. Most often, this means your input file is empty.
As you can see, the syntax for the pnmtojpeg is incorrect; it should specify "Contemporary Architecture.jpg" as the filename instead of "Architecture.jpg", and that is why the error shows. I will investigate further into the image_utils.php in the includes folder and see what I can do.