I’m using the Canon CHDK hacked firmware to shoot RAW image files on my canon sx230. It’s possible the firmware is simply bad, but since RAW is the primary purpose of the firmware, someone probably would’ve mentioned if it was broken for everyone.
In any case, I took about 600 pictures in RAW (.crw) format, and when I try to open them with raw viewers (like irfanview), it comes up as being an invalid raw file.
Now maybe they weren’t created correctly and the data is garbage, but I took a lot of good pictures that way and I’d prefer not to lose them if possible. (I shot in raw+jpeg, so it’s not a total loss, I’d just like access to the raw ones if possible).
So I was just wondering if anyone who knew more about RAW than me could see if there’s something I could do to make these images work. I don’t know if they’re a total wreck, or if maybe they just have some sort of resolvable formatting issue.
According toWikipedia, this format is supported by:
Adobe Photoshop
Aperture
AZImage based on libraw lite
ExifTool
Adobe Lightroom
Picasa
dcraw
jrawio
libraw
Raw Therapee
for what its worth, Photoshop 5.5, Preview and Xee on mac can’t open one of these. Did you ever get ANY usable raws with this camera after installing the hacked firmware?
If they’re .CRW files they should open with Canon’s DPP (Digital Photo Professional) software, but all I get is ‘image can’t be decoded’.
Googling about I did find this site; scroll down to ‘Taking RAW Photos’ where they say:
(Links are provided for the software mentioned)
Personally, I think some of these hacks are more trouble than they’re worth; better to spend the money on a G11 or 12, but at least you had the presence of mind to shoot RAW+JPEG.
The G series only have about a 4x zoom at best, the SX230 is 14X, not really comparable in focus. And some of the features you can get from these hacks are amazing, just a pity they didnt crack the 7D.
Checking for DNG4PS-2, on the site it doesnt list the SX230 as a supported camera.
You could be out of luck, ie maybe RAW generation was enabled on the camera, but noone has bothered to support its RAW files conversion wise.
Googling suggests there is an alternative called CHDK you can use for your SX230, it generates RAW to DNG fie conversion in camera, which can be read by many RAW converters. Not much help for your current files, but looks like it will make life a lot easier in future.
The firmware actually has an option for outputting the raw as DNG, but I didn’t know I had to do that - plenty of programs say they convert CRW and CR2.
Which makes me wonder if the CRW/CR2 on the camera isn’t actually up to the CRW/CR2 standard, and it has its own raw type.
The DNG4PS-2 software hasn’t been updated for a few years and I wasn’t able to figure out a way to get it to work with my camera.
So digging a bit more, I found out that they’re not really CRW files, they don’t comply with that standard. They’re just a raw dump from the sensor’s data. So you need to know how the camera formats the data to be able to use it.
I think Adobe DNG Converter would do it, if it supported my camera, which it doesn’t. I can’t find anything that does.
Just opening these as raw binary data I can tell that there’s a real image there (e.g., #6344 is the sun over a lake(?)). It looks like the file format (at least the part holding the image data) is indeed a raw binary dump, but I haven’t got time right now to figure out the color and byte orders. I’ve never played with RAW formats, so I don’t know how many varieties there are; it seems plausible that this would at least be similar enough to some other Canon raw format that you could find or modify an existing reader.
I assumed the file was an uncompressed bitmap-like format (i.e., a list of fixed-length rows of pixels), which turned out to be the case. It’s pretty easy to find the row length: plot the data and look for periodicity. In this case the period was 6252 bytes. That gives you a bitmap, when you plot it at one byte per pixel.
The problem is that the actual image has three color planes, each probably having a color depth of more than one byte, so maybe there are, say, six bytes per pixel instead of just one. So you have to figure out which are the high and low bytes, which represent which color, and so on. (The reality can be even more complicated than this: the different-color pixels are offset from each other and may not all have the same density or color depth, for example. I don’t know the specifics for this camera.) It’s pretty easy to find a high-byte color plane, just by looking for parts of the image that make sense; that’s all I did to figure out what the image was. The rest of it would take a little more work and some research. If there’s open-source software out there for reading a related Canon RAW format, it might be easily modifiable to read these.
Well, in the future, I can have the camera convert to DNG, but it looks like there’s nothing I can do now but hope someone comes out with a dng converter that handles the camera’s output. At least I know there are actual images under there and not erroneous data, so thanks for that, I’ll save them.
Some things that might help. From this thread at the CHDK forum, you can convert the CRW files to DNG files by prepending a header to the CRW files. The basic command is
copy /b 1.hdr + file.raw file.dng
but that assumes you have a .hdr file. If you can make one, you could try that. Possibly, make a DNG file, and the beginning portion of it could be used for all the .CRW files you have.
Looks like 2512 is a mountain scene. The actual pixel dimension of the image are 3126 x 1020 (I think…). I was able to get a basic image using Graphic Converter, but it keeps crashing when I try to use Bayer interpolation. You might want to look at this software.