From: Floyd L. Davidson on
bugbear <bugbear(a)trim_papermule.co.uk_trim> wrote:
>Jim Townsend wrote:
>> Canon's early RAW images were 12 bit. The newer cameras
>> produce 14 bit CRW images. The are saved as 16 bit
>> images.
>
>Ah hah!

But when "saved as 16 bit images", the data is re-encoded
using 16 bit values. It is *never* padded with zeros.

>> There are 12 or 14 bits of actual image data and the
>> remaining bits are padded with zeros.
>> 8 bits = 255 (Binary 11111111)
>> An 8 bit color image is composed of three channels X 255
>> 16 bits = 65535 (Binary 1111111111111111)
>> A 16 bit color image is composed of three channels x 65535
>> DCraw might be able to process 16 bit images, but GIMP
>> cannot. GIMP converts 16 bit images to 8 bit images
>> when you open them. The value of 255 per channel in
>> GIMP's histogram is normal for an 8 bit image. I
>> don't know why you think this is high. (Open an 8 bit
>> JPEG in GIMP and you'll see the histogram still shows
>> 0-255 per channel).
>
>Because I was missing the info you gave me!
>
>I was expecting 12 (or maybe 14 bit) data, UNPADDED,
>which would have given me 4 (or maybe 6) bit data after crunching
>down to 8 bit in netpbm (which divides everything by 257)

That does not make sense. Regardless of conversion to a
16-bit format, when encoded in an 8-bit file you would have
8 bits, not 4 or maybe 6.

It is also most certainly *not* done by simply dividing
everything by 257! (See the other article that I posted.)

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd(a)apaflo.com