Forgot to also add this Canon CRW info I found at
The Canon RAW (CRW) File Format"The Canon RAW (CRW) File Format This is a description of the Canon CRW file format. CRW files are written in Camera Image File Format (CIFF). The original Canon CIFF documentation can be downloaded from
Index of /ciff (which I finally discovered after writing this document!). Note that Canon uses two different RAW formats, and some camera models produce CR2 instead of CRW files. The CR2 files use a TIFF format, which is different than the CRW CIFF format documented here.
Comments about the CRW Format The Canon CRW file format is a joy to work with. It has a structure that is fundamentally similar to TIFF, with directories that point to data within the file. But a major improvement over TIFF is that the offsets are not absolute, they are relative to the start of the data block for each directory. This allows subdirectories within a file to be moved or copied to another file without having to adjust the offsets, which is fantastic because it means that rewriter software doesn't have to understand the complete format in order to be able to successfully rewrite the file.
Also, the data comes before the directories in the file, which is the natural way to write information and minimizes the amount memory needed to buffer the data (unlike the EXIF standard which is the reverse).
A short rant about TIFF inadequacies: TIFF format on the other hand, really sucks in comparison (this includes JPEG too, since JPEG uses TIFF format to store the EXIF information). The main problems are the use of absolute offsets and the ambiguity between integers and pointers (such as those used for custom IFD's). Because absolute offsets require adjusting whenever anything is moved in the file, the format of ALL contained data structures must be understood to properly edit the file. This results in an impossible situation when presented with undocumented custom structures like those used in the maker notes written by modern digital cameras. This is why it is so common for image editors to either scramble the maker notes or discard them completely. The official TIFF recommendation is to discard unknown information when rewriting the image (as Photoshop does), but for many, including myself, this option is simply unacceptable.
The bottom line is that rewriting a Canon CRW file is about 20 times easier, and much less prone to errors than rewriting a TIFF or JPEG."
Gene