Difference between revisions of "Gallery2:Modules:dcraw" - Gallery Codex
Personal tools

Difference between revisions of "Gallery2:Modules:dcraw"

From Gallery Codex

m (Dcraw Module)
Line 1: Line 1:
{{review}}
 
{{expand}}
 
 
 
=Dcraw Module=
 
=Dcraw Module=
 
Toolkit to create viewable jpeg version when RAW image formats are uploaded.  Requires ''dcraw'' external binary.
 
Toolkit to create viewable jpeg version when RAW image formats are uploaded.  Requires ''dcraw'' external binary.

Revision as of 01:43, 10 January 2007

Dcraw Module

Toolkit to create viewable jpeg version when RAW image formats are uploaded. Requires dcraw external binary.

A precompiled linux binary (v7.86) is available at fotoghost.com (zip). It was statically compiled and therefore should work on many linux systems. This is useful for users who do not have shell access.

Source and Windows and Mac OS X binaries can be found here.

Also see: Installing Modules with External Dependencies.

Notes & Gotchas (version 1.0.4)

For those who have version 1.0.4 installed on their galleries and attempt to upload raw digital files like NEF, MRW, CRW, etc. and are unable to access the full sized image, this is because dcraw is pulling the embedded thumbnail in the raw file.

Example:

D200 NEF raw file contains a 160x120 JPEG thumbnail embedded in the NEF file. dcraw picks up on this and the dcraw module reports the image's full size to be 160x120.

A workaround to this problem can be accomplished by making the following edit:

File:

modules/dcraw/classes/DcrawToolkit.class

Find the lines that look like the following:

           $cmd = array($dcraw, '-c', '-a', '-q', '0', $sourceFilename, '>', $tmpFilename);

           $cmd = array($dcraw, '-c', '-a', '-q', $sourceFilename, '>',
 


And change it to:

           $cmd = array($dcraw, '-2', '-c', '-a', '-q', '0', $sourceFilename, '>', $tmpFilename);
           
           $cmd = array($dcraw, '-2', '-c', '-a', '-q', $sourceFilename, '>',
 


by adding the '-2' to the array definition. This forces the dcraw to parse the true full size of the image submitted.

This may increase the processing time for a particular large raw file or for a particular slow server, so you will want to increase the timelimit for the module:

From:

           $gallery->guaranteeTimeLimit(90);

To:

           $gallery->guaranteeTimeLimit(180);

Might be worthwhile to consider tweaking the dcraw module in the next revision to take the presence of thumbnails into account for size considerations.

advertisements