From: Pascal R. <pr...@ma...> - 2009-12-30 04:09:05
|
I'm playing a bit with ERAttachment to create thumbnail (so that everyone can upload their photo on wocommunity.org :-)) and when I try the ImageMagickProcessor (I installed ImageMagick with MacPorts), I get this : ImageMagickProcessor.processImage: [/opt/local/bin/convert, -limit, Memory, 128000000, -size, 160x160, -resize, 160x160, -unsharp, 2.5x1+0.35+6, -quality, 90, /tmp/ ERAttachmentUpload-6081869734440864961.tmp[0], /tmp/ ERAttachmentUpload-6081869734440864961.tmp] déc. 29 21:59:04 WOCommunity[6001] (ImageMagickImageProcessor.java: 126) WARN er.attachment.thumbnail.ERImageProcessor - Warning: ImageMagick convert returned with a value of 1, error = convert: no encode delegate for this image format `/tmp/ ERAttachmentUpload-6081869734440864961.tmp' @ constitute.c/WriteImage/ 1145. I guess this is because ImageMagick use the file extension to determine the type of image and since the file extension is .tmp, it can't resize the image. I looked at the "convert" command-line options and it look like we need to specify the file format before the filename, like this : jpeg:/tmp/1.tmp jpeg:/tmp/2.tmp Before I try to patch ImageMagickProcessor to add those two arguments, I just want to see if a workaround exist or if I'm doing something wrong. And yes, a call to "convert" with the same arguments as ImageMagickProcessor use but with files with a .jpg extension works just fine, no error and the output file is resized. |