Page 1 of 1

0-byte thumbs with ImageMagic

Posted: Fri May 27, 2005 5:37 am
by Emmental
Whenever I rebuild thumbnails ImageMagic creates empty files (0 bytes). If I run the command manually in the image directory (convert -antialias -scale "110x110" image.jpg image-thumb.jpg) it works fine.

I'm running on Windows and have my ImageMagick path set to C:\Program Files\ImageMagick\convert.exe

Can anyone suggest what might be wrong? A PHP setting maybe?

Edit: I'm getting no error message by the way, it appears as though all is working fine but creates empty files.

Thanks.

Posted: Fri May 27, 2005 7:05 am
by Emmental
OK, I've managed to figure this one out.

I echoed the generated $cmd in the functions_images.inc.php file, and it seems that C:\pathname was getting changed to C: pathname

Changing escapeshellcmd($serendipity['convert']) to just $serendipity['convert'] seemed to fix it (and also all other occurences in the file). Obviously that's not really a very good solution but it seems to get things working for me.

Also, I had to use the DOS short version of Program Files (progra~1) in my ImageMagick path setting.

I'd tried all sorts of combinations of double and single forward/backslashes but none of those worked, so I went with the fix above.

Nice One

Posted: Thu Dec 01, 2005 8:21 pm
by Eor
I had the same problem.
Thanks very much for that solution.