Slipping into procrastination mode again. Quick brain/link dump, better get back to work.
I'd assumed this would be like PCM files in audio, i.e. the raw data like .wav (there is/was an audio format called RAW, I can't find a decent reference). Yes and no. It is like PCM in that it's essentially the stuff straight from the sensor, no in that where PCM there are only handful of variables to worry about ( byte order, sample rate, bit depth, mono/stereo - that's about it) RAW formats (there are many) are proprietary. This table of filename extensions doesn't bode well:
.crw .cr2 (Canon)
But it's not all bad news, there's an active, mature and open source C library/tool, dcraw. It covers a lot of formats/cameras (200+ it says here).Â So assuming you can open up, mess with the contents and close up these files, the next question is where to put the RDF. I don't know if it would be possible to be "officially" systematic across the individual formats, if they all have space allocated for metadata. I would expect so, but it's not guaranteed.
I'm wondering about a different approach, embedding the RDF in the image data itself. If a little codec library was set up for this, it could potentially be used in any analog-derived format - like .wav. A lot of work has been done in this general area, check the links on steganography - I've not followed up the image stuff yet, but mp3stego looks interesting, there's even talk of making a filesystem this way.
But most of the stego material is concerned with hiding (usually unrelated) messages in the data. I like the idea of using the same techniques to reveal more about the data itself. In this case, embed the image's own metadata in the image data. I'm sure it's technically feasible - invisibly spreading a few kB of RDF/XML text through a binary file that's way up in the 10s/100s of MBs, with a marker for subsequent decoding. A completely imperceptible change in the photo data, and it knows when, where and by whom it was taken...
(Same trick should be doable for executable binaries, stick the
metadata in constants...er, then figure out how to decode).
Further questions are - what other data is already provided in the RAW files? - is there stuff corresponding to EXIF? Can it be extracted and re-implanted as XMP? Dunno, probably, maybe.