Page 1 of 1

create a special deletage

Posted: 2009-06-15T13:43:36-07:00
by pokra01
Hello,

I'm heavy trying to create a delegate for input and output unknown file format but it doesn"t work. I don't want that imagik analyze the content of file to determine the format so i uses file prefix.

<delegate decode="f1" encode="f2" command="rename %i %o"/>

imconvert -verbose f1:file1.txt f2:file2.txt

>>>
imconvert: unable to open image `f1:file1.txt': No such file or directory @ blob
.c/OpenBlob/2489.
imconvert: missing an image filename `f2:file2.txt' @ convert.c/ConvertImageComm
and/2772.

Thanks

Re: create a special deletage

Posted: 2009-06-15T14:11:30-07:00
by magick
Each delegate must output an image format ImageMagick understands. In your example the f1 delegate would need to produce an output image, for example, in the PNM image format for the delegate to work properly.

Re: create a special deletage

Posted: 2009-06-15T18:46:57-07:00
by anthony
That is true. IM still needs to complete the 'convert' command to see if the user actually modified the image or not (image remains untainted). As such it still needs some way to at least read the 'f2' delegate, as an image.

IM is first and always an image converter.

I will try to re-write the 'direct delegate conversion' section to try and make this clear.
http://www.imagemagick.org/Usage/files/#delegate_direct

Give it a day or two.