home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / graphics / 8814 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.1 KB

  1. Path: sparky!uunet!mcsun!uknet!mucs!lilleyc
  2. From: lilleyc@cs.man.ac.uk (Chris Lilley)
  3. Newsgroups: comp.graphics
  4. Subject: Re: HELP! XWD -> GIF/PICT
  5. Message-ID: <5730@m1.cs.man.ac.uk>
  6. Date: 13 Aug 92 00:07:07 GMT
  7. References: <1992Aug12.172514.24659@oracle.pnl.gov>
  8. Sender: news@cs.man.ac.uk
  9. Reply-To: lilleyc@cs.man.ac.uk (Chris Lilley)
  10. Organization: Department of Computer Science, University of Manchester UK
  11. Lines: 39
  12.  
  13. In article <1992Aug12.172514.24659@oracle.pnl.gov> d3g450@tnp_op.pnl.gov (MC Pottier) writes:
  14.  
  15. >   I need to convert XWD images from a Sun sparcstation to either a PICT or
  16. >GIF format. Does anyone know of a RELIABLE way of doing this? (utilities,
  17. >programs, applications). I've tried the ppm utilities, (xwdtoppm ppmtogif) and
  18. >they don't work. I end up with black bitmaps...
  19.  
  20. First, are you sure the XWD are correct, you are using the latest
  21. version,etc
  22.  
  23. After that, you can avoid the ppm to gif bit, but its tricky. I do not
  24. know of a way to convert xwd to anything much other than ps or ppm.
  25.  
  26. You will need to know the gamma of your monitor for this, as it
  27. assumes corrected (linear) RGB values.
  28.  
  29. xwd (yor preferred options) | xwdtopnm |ppmtorle | rleflip | rleswap
  30. -t 2,1,0 |to8 -g (yourgamma) | rletogif > file.gif
  31.  
  32. rleflip is because the origins are different for xwd and rle files,
  33. rleswap because they store RGB in different orders. to8 is an
  34. optimised 24 to 8 quantiser. It emits an 8 bit file with an assumed
  35. gamma of 2.5. You can change that if it is not suitable.
  36.  
  37. I use a similar pipeline to display 24 bit gamma corrected versions of
  38. un-gamma corrected 24bit windows. xwdtopnm works fine for me. I can't
  39. say about ppmtogif, I don't use it.
  40.  
  41.  
  42.  
  43.  
  44. --
  45. Chris Lilley
  46. ---------------------------------------------------------------------------
  47. Technical Author, ITTI Computer Graphics and Visualisation Training Project
  48. Computer Graphics Unit, Manchester Computing Centre, Manchester, UK
  49. Internet:   lilley@cgu.mcc.ac.uk        Janet:   lilley@uk.ac.mcc.cgu
  50. Voice:      +44 (0)61 275 6095          Fax:     +44 (0)61 275 6040
  51. ---------------------------------------------------------------------------
  52.