Much of this has been answered already through several emails, I thought I'd try to bring it all together and add a little more of the mathematics...
> ... So, if JPEG loses, or throws away, a lot of information, why > are the files > when converted to TIFF (or PSD) so large? Where does the extra > info come from? ... In the camera... The image is not created in JPEG format then converted to TIFF. The order of operations is RAW sensor data -> 8bit RGB rendering -> Compressed 8bit RGB rendering The RGB rendering is what the camera uses to create the TIFF file. It is larger than the RAW file because the RAW file uses 12bits to describe each photosite state where the TIFF file uses an [r,g,b] triplet of three 8-bit bytes to describe each pixel, where the number of pixels is the same as the number of photosites. That's 24 bits vs 12 bits to describe the same thing, so the uncompressed TIFF file has to be at least twice as large. There is additional overhead in the TIFF file's structure as well. The JPEG rendering is the compressed 8bit RGB rendering. It's resulting smaller file size is a matter of compression coding, packing the [r,g,b] pixel array values into a more compact form of numbers that can be 'unpacked' back into a reasonably accurate rendering of the RGB image according to an algorithm. Out of the camera... Taking a RAW file and performing RAW conversion to an 8bit TIFF file does the same thing that doing this in the camera does. If you convert a RAW file to a 16bit TIFF file, each of the pixels is assigned an [r,g,b] value with 16bit values instead of 8bit values, which allows for more precision in manipulation ... the resulting data size is twice again as large as an 8bit TIFF file. Taking a JPEG file and converting it to a 8bit TIFF file simply reverses the JPEG packing back into the expanded, simple 8bit per channel [r,g,b] pixel description array. Precison 8bit vs 16bit: Say you look at a pixel value from an 8bit TIFF file and you get a triplet like [128, 128, 128]. That represents the amounts of R, G and B that are added together to produce the total intensity and color value of that pixel, on a scale of 0-255 possible values in each color. If you were look at the same pixel in a 16bit TIFF file rendering of the 12bit RAW data, the relative values of the channel assignments would be the same, but you have 16x as many numbers available to describe the values in the original RAW file which is then scaled to a representation in a discrete numeric space 8x larger (0-4095 in the RAW data, 0-32767 in the 16bit RGB channel (the topmost bit is not used so it's actually 15 bits of data)). Only 4096 of the values in the 16bit space are actual photosite RAW values, they're fitted into the larger space because current computing machinery manages 16 bit numbers with greater efficiency than 12 bit numbers, in general, *and* because as you perform Real or Discrete valued operations on these numbers, there are more numbers to represent the results, thus greater precision and less likelihood of clipping or round off errors. An illustrative example would be the 'digital' volume knob on many modern automobile radios. As you turn the knob, the display might display a range from 0 to 10, or it might display a range from 0 to 100. The actual analog amplitude of the volume is the same, but it is represented from none to max in two different resolutions... with the 0-10 representation you only get to set one of ten steps, with the 0-100 representation, you can set a lot more precisely the exact volume you want, with 10x the steps between values. > ... Further, when viewing a high quality JPEG in Photoshop, it > shows the file > size in the status bar to be about the same as the TIFF TIFF (or > PSD) file > made from that JPEG. ... > And why does Photoshop show the smaller JPEG file to be the size of > the larger TIFF or PSD file. Photoshop's description of image size is a description of the size of the uncompresed, actual pixel value array. If the array is packed in a JPEG or 'compressed LZW' TIFF file, it unpacks the values into an uncompressed array before reporting the size, which means that a PSD, TIFF or JPEG image with the same number of pixels and the same bit depth will show as the same size. Godfrey On Jun 15, 2006, at 6:30 PM, Shel Belinkoff wrote: > ...Taking an image shot in highest quality JPEG on the DS results > in a file > size of 1,900kb. Doing absolutely nothing to it but converting to > a TIFF > results in a file size of 17,600kb. Converting that file to 16-bit > doubles > the size. Now, making the same shot using RAW results in a file > size of > about 10,000kb, and converting it to TIFF results in a file size of > approximately 35,000kb. > > I've noticed the same behavior with my little Sony. It will > produce a TIFF > and a JPEG simultaneously, and when the JPEG is converted to a TIFF > it's > the exact same size as the original TIFF. > > Further, when viewing a high quality JPEG in Photoshop, it shows > the file > size in the status bar to be about the same as the TIFF TIFF (or > PSD) file > made from that JPEG. > > So, if JPEG loses, or throws away, a lot of information, why are > the files > when converted to TIFF (or PSD) so large? Where does the extra > info come > from? And why does Photoshop show the smaller JPEG file to be the > size of > the larger TIFF or PSD file. -- PDML Pentax-Discuss Mail List [email protected] http://pdml.net/mailman/listinfo/pdml_pdml.net

