| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
1993.12.02 15:15 "Help in TIFF tools software ?? (fwd)", by Amy P TaiForwarded message:
> From mailer-daemon@brunel.ac.uk Thu Dec 2 15:13:27 1993
> From: Amy P Tai <ci92apt@brunel.ac.uk>
> Message-Id: <11097.9312021512@monge.brunel.ac.uk>
> Subject: Help in TIFF tools software ??
> To: sam@sgi.com
> Date: Thu, 2 Dec 1993 15:12:54 +0000 (GMT)
> Cc: ci92apt (Amy P Tai)@brunel.ac.uk
> X-Mailer: ELM [version 2.4 PL21]
> Mime-Version: 1.0
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: 7bit
> Content-Length: 996
>
> 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.
> ************************************************
>
|
|||||||