Subject: Re: 8bit to 1 bit
> That does not work, it results in 8 pixel spaces between two black
> pixels. I think I need a way to pack 24 * 8 bits into 3 * 8 bits ?
Eh? Yes, after you reduce the 8 bit pixel to 1 bit (Thresholding, error
diffusion), you store that 1 bit value, not a whole byte. I don't know
what language that you're using, but in Pascal (Untested):
source:array[0..79] of byte;
dest:array[0..9] of byte;
for x:=0 to 79 do begin
if source[x]>128 then
dest[destx]:=dest[destx] or (1 shl subx)
dest[destx]:=dest[destx] and not (1 shl subx)
if subx<0 then begin
View All Messages in comp.graphics.algorithms
8bit to 1 bit =>Re: 8bit to 1 bit =>Re: 8bit to 1 bit =>
Copyright © 2006 WatermarkFactory.com. All Rights Reserved.