Using my own delegate for nef-files

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
bablokb
Posts: 29
Joined: 2005-06-11T06:21:59-07:00
Contact:

Using my own delegate for nef-files

Post by bablokb »

Hello,

the current setup uses the DNG-coder for NEF-files (defined in coder.xml) and a dng:decode-delegate (defined in delegates.xml). I would like to change this and use my own script. Specfically, I would like my delegate to extract the embedded jpg-image of the NEF-file. This is much faster than the conversion with ufraw and the quality-tradeoff is fine for me.

In previous versions of IM, it was enough to define a <delegate decode="nef" ... /> entry in delegates.xml. But this does not work anymore because IM uses the DNG-coder. Is there a coder that just uses whatever delegate is defined in delegates.xml? Note that changing the DNG-delegate does not really help, since the DNG-coder expects a pnm-file.

Bernhard
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Using my own delegate for nef-files

Post by magick »

Try creating a new delegate with a unique name, say mynef. Insert your delegate element into delegate.xml and then access the file like this:
  • convert mynef:image.nef image.png
bablokb
Posts: 29
Joined: 2005-06-11T06:21:59-07:00
Contact:

Re: Using my own delegate for nef-files

Post by bablokb »

Your tip works fine for single-images. But I have a lot of scripts where I use e.g. "montage *" in a directory with all kinds of file-types. No way to add mynef: to the relevant subset of files. And in other scripts, the filename is just passed in as an argument from the user.

Any other suggestion?

Thanks, Bernhard
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 10 guests