Camera Hacker


Add Comment | Related Links | TrackBack
Related Content

dcraw by example

In your "dcraw by example", you mention the mysterious PAM (Portable Any Map) format. You only get this with dcraw v8.00 or higher, and only with four-color raw images.

No monitor can display a four-color image, and maybe 1% of women (no men) can perceive four primary colors. Here's a simple script to split a PAM file into four PGM files:

for file in *.pam
for c in 0 1 2 3
pamchannel -infile $file -tupletype GRAYSCALE $c | pamtopnm > $file.$c.pgm

The raw colors are green, magenta, cyan, and yellow, in that order.

Dave Coffin
Thu, 9 Mar 2006 10:29:38 -0800

Thank you for the manual -- it's a great idea.

In your color balance example photographs, there is no way to tell what the colors of the original objects were.. It would suggest including some comment on what the colors were or maybe a jpeg of the objects taken using flash or some other standard lighting.

Thanksa again for your site.


Kiril Sinkel
Sat, 13 Jan 2007 16:44:23 -0800

You say [in the article]..."If you know how to display this file, please let me know." for the -o 0 option.

I believe a .pam file is a portable-anymap (also known as pnm for portable netmap, see for info).

Tim Hatch
Mon, 26 Mar 2007 09:43:24 -0800

It's misleading to illustrate the different output color spaces with images like your sRGB and Adobe RGB examples. A given image should look the same in any color space (apart from gamut clipping) as long as it is displayed by a color-management aware application. The application will map each image to the color space of the monitor. The color differences shown by your examples result from the fact that no browsers do color management (as far as I know).

Christopher Jones
Thu, 20 Sep 2007 05:38:10 +0000

Thank you. Stumbling on this just saved me about a 1,000 hours.

Sun, 04 May 2008 14:35:59 +0000

I�m trying to use dcrawMS(version for Vista)my problem is that every time I try to execute the commands PC reports that my file doesn't exist.I think it might be a problem of writing the file I do DSC0110.ARW. Any clue, any help?
Thank you

Luciano Costa
Thu, 22 May 2008 00:40:06 +0000

Need more information. Like the exact command and arguments you used, the directory content listing, and the error message.

Chieh Cheng
Thu, 22 May 2008 17:13:39 +0000

Thank you for the examples.

this Option gives a *.ppm output for v8.94 / dcrawMS.exe

D:\rl\...\dcrawMS -o 0 -v D:\rl\...\t1.CRW
Loading Canon PowerShot SX110 IS image from D:\...\t1.CRW
Scaling with darkness 128, saturation 4095, and
multipliers 1.648469 1.000000 2.160397 1.000000
AHD interpolation...
Building histograms...
Writing data to D:\rl\...\t1.ppm ...

Sun, 07 Feb 2010 17:51:33 +0000

<< Back to Article

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.


TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

Title: dcraw usage with a twist
Weblog: Camera Hacker
Excerpt: I am working on a digital imaging quality thesis up here in Stockholm and I am currently looking into different raw-conversions. I have up till now used and compared dcraw and Adobe's raw converter. The results show clearly how big difference different raw conversions influence the end result whe . . .
Tracked: Mon, 14 Apr 2008 16:23:22 +0000

Add Comment

Spam Control | * indicates required field
Your Name: *
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 8 + 3?
Click button only once, please!

Messages, files, and images copyright by respective owners.