Page 1 of 1

upgrading from 6.2.5 to 6.5.2-1 & "no encode delegate"

Posted: 2009-07-22T10:43:51-07:00
by erictheise
Hi,

I'm upgrading ImageMagick (& RMagick) in a large, old, and sprawling application (php & Ruby). Right now I'm looking at a series of system calls to the command line that go something like this:

convert -quality 100 -density 72x72 -geometry 575x "1247871752.jpg.original" "1247871752.jpg.tmp"
convert -quality 100 -density 72x72 -geometry x400 "1247871752.jpg.original" "1247871752.jpg.tmp2"

"1247871752.jpg.original" is a copy of a user-uploaded image.

In the production version of the application (using ImageMagick 6.2.5), these both work just fine. As I'm developing (using ImageMagick 6.5.2-1), the first command fails with this error message:

convert: no encode delegate for this image format `1247871752.jpg.tmp' @ constitute.c/WriteImage/1081.

I realize that appending ".original" and ".tmp" to ".jpg" was a bad design choice, but refactoring is not really an option at this time. I will likely change ".tmp" to ".tmp1" because it works, but before I do, I would like to understand what became special about ".tmp" as a file extension between 6.2.5 and 6.5.2-1.

Thanks very much for any insights, Eric

Re: upgrading from 6.2.5 to 6.5.2-1 & "no encode delegate"

Posted: 2009-07-22T12:32:04-07:00
by magick
We can reproduce the problem you posted and have a fix in ImageMagick 6.5.4-4 available sometime tomorrow.

Re: upgrading from 6.2.5 to 6.5.2-1 & "no encode delegate"

Posted: 2009-07-22T13:37:21-07:00
by erictheise
I couldn't be happier, thanks!

Re: upgrading from 6.2.5 to 6.5.2-1 & "no encode delegate"

Posted: 2009-07-22T22:09:51-07:00
by anthony
You can define 'delegates' that define what format 'tmp' 'tmp2' and 'original' actually refer to.

See IM Examples, File Handling, Delegates, especially the 'xyzzy' output delegate!
http://www.imagemagick.org/Usage/files/#delegate_output

Input is not so much of a problem, just as in that example, and the 'magic' part of ImageMagick takes care of reading.

Re: upgrading from 6.2.5 to 6.5.2-1 & "no encode delegate"

Posted: 2009-07-23T15:44:08-07:00
by erictheise
Last night's release appears to fix our problem without any modifications to the code base. I do appreciate the pointers to the delegate and other examples, and I am really impressed with everyone's responsiveness here.

Thank you!