home *** CD-ROM | disk | FTP | other *** search
- From: jem@hpcupt3.cup.hp.com (Jim McCauley)
- Date: Wed, 29 Jul 1992 19:05:08 GMT
- Subject: 3 RGBs -> 1 PPM = only 91 colors!?!
- Message-ID: <108000005@hpcupt3.cup.hp.com>
- Organization: Hewlett Packard, Cupertino
- Path: sparky!uunet!wupost!sdd.hp.com!hplabs!hplextra!hpcc05!hpcuhb!hpcupt3!jem
- Newsgroups: comp.graphics
- Lines: 26
-
- I tried to assemble red, blue, and green raster bitmaps of `lenna'
- into a 24-bit portable pixmap, and I think that I goofed somewhere.
-
- First, I converted the rasters to portable graymaps:
-
- rawtopgm 512 512 lenna.r.ras > lenna.r.pgm
-
- rawtopgm 512 512 lenna.g.ras > lenna.g.pgm
-
- rawtopgm 512 512 lenna.b.ras > lenna.b.pgm
-
- This resulted in a fine set of three graymaps. When viewed with `xv',
- the graymaps indicate anywhere from 189 to 230 gray levels each.
-
- I used the `rgb3toppm' program from the PBMPLUS toolkit to create what
- I thought would be a 24-bit portable pixmap:
-
- rgb3toppm lenna.r.pgm lenna.g.pgm lenna.b.pgm > lenna.rgb.ppm
-
- But when I view `lenna.rgb.ppm' with `xv', the Info window tells me
- that there are only 91 colors in the image. I don't see how that's
- possible. What gives?
-
- Jim McCauley, Learning Products Engineer ** I do not speak for **
- (that means that I write documentation) ** Hewlett-Packard in any **
- jem@cup.hp.com ** official capacity. **
-