home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / postscri / 5553 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.6 KB  |  59 lines

  1. Newsgroups: comp.lang.postscript
  2. Path: sparky!uunet!infonode!dave@maven.b29.ingr.com
  3. From: dave@maven.b29.ingr.com (Dave Bradford)
  4. Subject: Lev 2 Image Dictionary Question
  5. Message-ID: <1992Nov16.231218.16989@infonode.ingr.com>
  6. Sender: usenet@infonode.ingr.com (Usenet Administrator)
  7. Reply-To: dave@maven.b29.ingr.com (Dave Bradford)
  8. Organization: Intergraph Corporation, Huntsville, AL.
  9. Date: Mon, 16 Nov 1992 23:12:18 GMT
  10. Lines: 47
  11.  
  12. I am trying to write a color raster level 2 PostScript driver
  13. using run length encoding. My problem is that my data seems
  14. to be interpreted as RGB, RGB, ... instead of:
  15.  
  16. RRRRRRRRRR
  17. GGGGGGGGGG
  18. BBBBBBBBBB
  19.  
  20. I figure that by separating the color components by scanline I
  21. can get the most out of RLE encoding. I have been succesful
  22. using the level 1 colorimage operator with true 3 (multiple
  23. data source, 3 colors) but in the process of switching to 
  24. level 2 and using the image dictionary and image filters I
  25. have not had any luck.
  26.  
  27. Here is a sample of what I have tried (without compression):
  28.  
  29. initgraphics
  30. /inch {72 mul} def
  31. /width 300 def
  32. /height 300 def
  33. /finalwidth 1.00 inch def
  34.  
  35. /DeviceRGB setcolorspace
  36. 18 18 translate
  37. finalwidth finalwidth width div height mul scale
  38. /rline currentfile /ASCIIHexDecode filter def
  39. /gline currentfile /ASCIIHexDecode filter def
  40. /bline currentfile /ASCIIHexDecode filter def
  41.  
  42. gsave
  43. <<
  44. /ImageType 1
  45. /Width width /Height height
  46. /MultipleDataSources true
  47. /BitsPerComponent 8
  48. /Decode [0 1 0 1 0 1]
  49. /ImageMatrix [width 0 0 height neg 0 height]
  50. /DataSource [rline gline bline]
  51. >>
  52. image
  53. ....... data not included ......
  54.  
  55. Any help is very much appreciated.
  56. -- 
  57. Dave Bradford    dave@maven.b29.ingr.com      (Internet)
  58.  
  59.