# 1999.10.05 00:02 "Re: How adobe write TIFF format?", by Daniel McCoy

I would assume that they multiplied the 12-bit number by 16 (or shifted it up four bits depending on how you look at it) to rescale 0-4095 into the range 0-65520.

Then, if they were smart, they added the top four bits of the original value (original / 256) back into the new value, making the range 0-65535. (ie. sixteen = (twelve << 4) + (twelve >> 8) assuming all are unsigned)

Either way, you should just be able to divide by 16, (or shift the number down four bits) to get it back to the range 0-4095. (twelve = sixteen >> 4)

Dan McCoy Pixar mccoy@pixar.com