The raw data in Canon CR2 files are compressed with lossless JPEG. I have no idea why you think that lossless JPEG is 8 bit.
You can read a detailed description of what a .CR2 contains here:
http://lclevy.free.fr/cr2/#lossless
Ah yes, in which it clearly states (under section 2.1 Overview):
"The .CR2 file is based on the TIFF file format. This TIFF file has 4 Image File Directories (IFDs). "
How is that relevant? It does not disprove that CR2 is compressed with lossless JPEG, since TIFF is a container format which can be used for several different compressed and non-compressed image formats.
So the site you referenced clearly says .CR2 is based on TIFF, and yet you still maintain it's lossless JPEG.
The words "sorry, I was mistaken" clearly do not exist in your vocabulary.
Personally, I don't give a toss what format .CR2 is based on, as long as it continues to give me the results I need.
why would Alan say he's sorry when he is correct: the Tiff format is a container format that can contain many kinds of image data including the usual (for the base TIFF specification) uncompressed data or data compressed both by lossy compression including zip type compression or loss-less compression such as JPEG-LS Huffman compression. The Canon CR2 file format uses the TIFF format to contain a proprietary loss-less compression somewhat similar to the JPEG-LS standard although not identical.
Regards, GordonBGood
The words "sorry, I was mistaken" clearly do not exist in your vocabulary. This is clearly true for the both of you. Is it JPEG or is it like JPEG? Like JPEG is not JPEG. Is it JPEG is a binary question, the answer is either "Yes, it's JPEG" or "No, it's not JPEG". By the way, compression of
what? Just because the
compression algorithm is similar, doesn't mean the
data it compresses is!
Incredible how hard it is for some people to admit they were wrong and not try to wiggle their way out of things with semantics.
Your mistake arises from assuming that the JPEG standard only includes the lossy compression of images as described by
this wikipedia article, but you'll note in reading that article that the JPEG standard (T.81 Part 1 - 9/92) which was made into ISO/IEC standard 10918 in 1994) includes more than just that base capability.
The ITU.T T.81 document describes both the use of the standard for the usual lossy compression and decompression codecs as well as in Annex H a specification for using a Loss Less Compression using Huffman encoding for bit depths from two to sixteen bits. Thus, the JPEG standard describes a container format that can contain images encoded with various schemes including the usual one but also a loss less mode not commonly supported by base JPEG codecs. A JPEG format is just a container format just as is a TIFF format, each of which can include images encoded in the other as part of their format.
As to what data is encoded as to channels, that to is specified in the above JPEG standard document.
The Adobe raw DNG format expressly uses
exactly the JPEG Loss Less option for compression inside a TIFF container as is part of its specification whereas other proprietary raw formats use slight variations of the same basic JPEG Loss Less techniques, also inside TIFF containers for the most part. THE DNG standard adds meta data "tags" to the TIFF standard so that the DNG file format must contain enough information to allow a raw converter application to be able to fully decode the raw data to a displayable image without knowing anything more about the camera producing the raw data.
So in answer to your binary questions, no the Canon CR2 and Nikon NEF raw formats do not include JPEG raw data inside their TIFF envelopes because they do not adhere
exactly to the JPEG standard including Annex H (although there are some close similarities), and the loss-less compressed raw data section of DNG is actually a true embedded JPEG image as per Annex H, just as embedded thumbnails and previews also adhere to that standard as they can be encoded as base loss eight-bit JPEG images (with some overlap from the TIFF standard in describing this).
The reason that base JPEG decoders cannot view such images is because they are base and because these images are encoded as un-demosiaced raw data which needs to be raw converted to produce something displayable on an RGB display. That is why as standard such as DNG needs to exist in order to provide enough information to allow this raw conversion of the raw data without knowing any other details of the camera producing the image.
You are ignoring that both JPEG and TIFF (especially TIFF)
are container formats intended to have the capability to contain other formats, where TIFF can contain any of the standard JPEG formats, and JPEG can contain many variations including some of the forms of TIFF type formats in particular sections. For instance, JPEG thumbnails are often encoded as an embedded uncompressed TIFF format complete with TIFF headers.
You seem to be fixed in thinking that if a file can't be opened and displayed by the common base JPEG or TIFF decoder on your computer it is then not JPEG or TIFF formatted, respectively; however, that is not the case as those are just
base decoders.
I suggest you read and fully digest the above linked or referred standards documents before you comment further.