Last night I reached a new milestone in libopenraw: being able to decompress the RAW data from CR2 files using Lossless JPEG. The lazyweb has been helpful in finding code for it (libjpeg does not support it) code that I ported from old K&R to C++. I'm still not completely statisfied with the port but it works much better than my attempt to port some MIT-licensed Java code.
Above is the PGM I generated, that contain the RAW data, viewed in eog. The look is due to the fact that we have a GRBG 2x2 color filter array diplayed as a graymap, and that eog does sone dithering. This is the data I should be passing to the demosaicing code. The picture is one of the random sample I took from my own photo library, taken around the corner from where I was living in Montréal.
DNG support should come The code is in the git repository.