1993.12.02 15:15 "Help in TIFF tools software ?? (fwd)", by Amy P Tai
Forwarded message:
> Hello,
>
> I have a probelm in the software that I got from the v3.0.tar.Z.
>
> One of the TIFF tools file tiffdither.c cannot provide clear explanation.
> Even after looking through the man1/tiffdither.1 which still cannot answer
> my questions.
>
> In the file tiffdither.c, it converts the image from greyscale to bilevel.
>
> The following is the bit I don't understand :
>
> for (j = 0; j < imagewidth; ++j){
> register int v;
>
> lastpixel = (j==jmax);
> v = *thisptr;
> if(v<0)
> v = 0;
> else if ( v > 255 )
> v = 255;
>
> if ( v > threshold ){
> *outptr |= bit;
> v -= 255; ???
> }
> bit >>= 1; ???
> if( bit == 0 ) {
> output++;
> bit = 0x80;
> } ???
>
> Where it has ???, I don't understand why this line is needed and what is it
> doing ?
>
> Please help me with this problems or any comments will help.
>
> Thank you.
>
>
> ************************************************
> * Amy Tai, ci92apt@brunel.ac.uk
> * Brunel University, United Kingdom.
> * Department of Computer Science.
> ************************************************
>