Enabling RAW DNG Images With CHDK
One of my favorite features of CHDK is the ability to save RAW DNG images on my Canon Powershot camera. This provides a lot of extra flexibility to edit and colour correct your photos compared to JPEGs. CHDK has recently added a new menu item that allows you to enable DNG support without the need for the old badpixel.lua script technique. I have also done some experimentation with Adobe camera profiles and CHDK DNG images.
Step 1.
Open the CHDK alt menu and navigate to the RAW parameters menu.
Select the Create badpixel.bin menu item.
The camera will take two images and process them to come up with a bad pixel map. It took about 35 seconds to create the file on my camera.
Step 2.
Enable Save RAW.
Turn on RAW file in dir with JPEG
Turn on ‘DNG” file extension
Set Bad pixel removal to Off
Turn on DNG format. (This will allow you to open the RAW DNG image right in Photoshop without any conversion.)
Step 3.
Capture the RAW image. You will see the text "DNG:" on the lower right corner of the camera's LCD screen when Save Raw is enabled.
Step 4.
Transfer the photos to your desktop computer using your usb memory card reader.
Step 5.
Post process the DNG formatted photos using your favorite graphics package. The DNG images work perfectly with Adobe Photoshop and Lightroom.
Here are DNG and JPEG sample image taken with CHDK and a Canon Powershot SD780 IS / IXUS 100:
Sample DNG Image (18 MB):
Sample JPEG Image taken at the same time (1.8 MB:
8 Responses to “Enabling RAW DNG Images With CHDK”
Leave a Reply
Note: Comments will have spelling errors corrected before they are posted. If you have a specific question please provide your email address so I can send you a direct reply.






What settings did you use to correct the Lens distortion and chromatic aberration on the SD780IS with DNG Raw.
I have started using lightroom and wanted to know if there were presets that can be used to fix the distortion caused by using DNG with CHDK.
Thanks for your answer.
Hi Sam.
I have just started learning how to use Adobe Lightroom. One way to create a lens distortion preset would be to do the following:
Print off a bold grid or checker pattern on a piece of paper and photograph it using your Canon SD780IS camera at the wide, medium, and telephoto zoom settings.
Adjust the lens distortion parameters in Lightroom for the three images until the grid lines in the CHDK DNG images are straightened out without any curvature.
Then adjust the chromatic aberration settings until any colour fringing is taken care of.
Next save your new presets.
Thats actually a pretty clever idea.
Btw any resources on how to save these settings as presets?
Sam,
I created a few Adobe Lightroom presets to correct for lens
distortion in SD780IS CHDK DNG RAW images.
You can read about the presets here:
http://www.andrewhazelden.com/blog/2011/09/fixing-lens-distortion-in-chdk-dng-raw-images/
Btw if you are editing in Raw anyways, why do you save jpeg as well. I am finding that my camera slows down when I am saving jpeg alongside.
It all depends on the type of scene I am shooting and how much time I have. If I'm using a tripod while shooting a fairly static scene I would probably keep the Canon JPEG as a reference.
Thanks for the handy information here. I just got a SX230 and installed chdk. When I created the bad pixel file it said I had 20789. Is this in the norm?
Steve
Hi Steve.
I wouldn't worry too much about how many bad pixels are listed as long as the finished CHDK RAW / DNG photos look okay.
Regards,
Andrew