AWARE [SYSTEMS] | ||||||||

TIFF and LibTiff Mailing List Archive | ||||||||

## LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
## Thread## 1999.10.05 00:02 "Re: How adobe write TIFF format?", by Daniel MccoyI 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 From: Mauricio <escarpin@sel.eesc.sc.usp.br> >Hello, >I'm working with TIFF format and I have a problem: my scanner uses 12 >bits to digitalize the image. I'm using the Adobe to write the image and >I realized that the writed image has 16 bits (value from 0 to 65535). My >doubt is: how my value (that must is between 0 and 4095) is converted to >range 0 65535? I know that Adobe write the least significant byte first >and, after, the most significant byte, but I don't know which part of >the byte I have to discard. Can anyone help me? >Thanks. > Mauricio |