From email@example.com Sun Mar 27 10:58:48 1994 Received: from Lindy.Stanford.EDU by ccsg.tau.ac.il (sendmail 920330.SGI/sub910417) id AA16302; Sun, 27 Mar 94 05:32:20 +0200 Received: by lindy.Stanford.EDU (4.1/inc-1.0) id AA22156; Sat, 26 Mar 94 19:32:15 PST Date: Sat, 26 Mar 94 19:32:15 PST From: ralerche@lindy.Stanford.EDU (Robert A. Lerche) Message-Id: <9403270332.AA22156@lindy.Stanford.EDU> To: firstname.lastname@example.org In-Reply-To: Michael's message of Sun, 27 Mar 1994 03:12:51 +0200 (IST) <Pine.3.88.9403252201.A13916email@example.com> Subject: Brush2PS (fwd) > If I understand you correctly, I have to read each pixel of the picture, > decide how many gray shades are needed for it, translate each color to a > number between 0 to 2^bits_per_sample and write the image data according > to these values. I also assume that for color image, I'll have to split > each color into its red, green and blue values and convert each value to > its own gray shade like I did with the b&w image. Yes, you've got it. Actually, 0 to (2^bits)-1. (i.e., 0, 1, 2, or 3 for a 2-bit pixel).