home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / graphics / 8286 < prev    next >
Encoding:
Internet Message Format  |  1992-07-30  |  1.3 KB

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