"SJS" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Fri, 04 Jun 2004 14:02:05 GMT, "CSM1" <(E-Mail Removed)> wrote:
>
> >"SJS" <(E-Mail Removed)> wrote in message
> >news:(E-Mail Removed)...
> >> Hi,
> >>
> >> I would like to convert 16-bit scan values to 8-bit values but am
unsure
> >> of the correct method. I am assuming a gamma of 2.2.
> >>
> >> My current formula is :
> >> output = ((input / 65536) E (1 / 2.2)) * 256
> >
> >To convert 16 bit to 8 bit drop the upper 8 bits or divide by 256.
> >Do an integer divide to drop the fractions.
>
> Oops, in my post I should have stated that the 16-bit values are gamma
> 1.0 and the 8-bit values are gamma 2.2. Are you sure that I simply drop
> the lower 8 bits ? Wouldn't this just reduce my density range to 256 ?
>
> -- Steven
>
Do not drop the lower 8 bits, drop the upper 8 bits.
In a 16 bit word, you want to drop the high byte and keep the low byte.
If you know how to shift bits the operation is a << 8 or a left shift of 8
bits.
16 bit values are 0-65535 and 8 bit values are 0-255
By dropping the high byte you reduce the the number of colors that can be
represented from 65536 to 256 in each Red, Green or Blue color.
I do not know if it will affect gamma.
All I know is that the output of the scanner is nothing but data. How much
data depends on what the software has told the scanner to do.
Check out
www.scantips.com.
Wayne Fulton is really good with scanners. Also check
http://hamrick.com/
He writes software for scanners. (VueScan)
--
CSM1
http://www.carlmcmillan.com
--