create a special deletage

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
pokra01

create a special deletage

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: create a special deletage

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: create a special deletage

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply