Page 1 of 1

remove or disable decode delegate?

Posted: 2014-06-10T12:09:32-07:00
by beakman
hi everyone,

I use an app that utilizes IM on the backend to generate thumbnails. We've now run into an issue where when items are added that include RAW image files (which are HUGE), the thumbnail process takes way too long. Add to that we don't even WANT those file thumbnailed. So is there any way to disable or remove the decode delegates to stop this? The app I'm using, unfortunately, doesn't let us pick and choose what filetypes to thumb, so I'm looking for a workaround.

thanks!

Re: remove or disable decode delegate?

Posted: 2014-06-10T12:23:29-07:00
by Bonzo
You can edit delegates.xml but I would think you may get errors if you remove the delegate reference. Give it a try and see what happens?

Re: remove or disable decode delegate?

Posted: 2014-06-10T12:42:00-07:00
by snibgo
Another possibility: replace the delegate with one that ignores the input and creates a dummy image, say 1x1 pixel. After the conversion you could search for these and delete them.

Re: remove or disable decode delegate?

Posted: 2014-06-10T12:51:09-07:00
by beakman
Bonzo wrote:You can edit delegates.xml but I would think you may get errors if you remove the delegate reference. Give it a try and see what happens?
Thanks. How would that go? Just remove any reference to RAW files? Sorry, new to (hacking) IM. :)

Re: remove or disable decode delegate?

Posted: 2014-06-10T13:31:34-07:00
by Bonzo
I belive this is the line that deals with RAW files:
<delegate decode="dng:decode" stealth="True" command="dcraw.exe -6 -w -O "%u.ppm" "%i""/>

You could check out the dcraw website and see what options may help or remove the line altogether.

Re: remove or disable decode delegate?

Posted: 2014-07-22T14:01:37-07:00
by crowtato
Any luck, Beakman?

I've got a similar situation with another program (EMu/KE Software) that uses Imagemagick/dcraw on the backend to handle DNGs. Any time we load a DNG in EMu, a huge, slow, unnecessary(?) temporary.ppm file is created...We've tried editing the delegate code with no luck:

- replacing:
"-O "%u.ppm""
with:
"-T "%u.tiff"" (and variations on that)

deleting the "-O" or "-T" piece entirely

...All of which results in the error message: "unable to open image '.ppm': no such file or directory at blob..."


(None of the DNG metadata gets passed along either, but I'm thinking of adding "exiftool.exe -xmp:all" somewhere in the delegate...)

Re: remove or disable decode delegate?

Posted: 2014-07-22T17:43:59-07:00
by magick
Take a look in policy.xml. The docs contained within says:

Code: Select all

  Suppose we do not want users to process MPEG video images:

    <policy domain="delegate" rights="none" pattern="mpeg:decode" />

  Here we do not want users reading images from HTTP:

    <policy domain="coder" rights="none" pattern="HTTP" />