home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 16100 < prev    next >
Encoding:
Text File  |  1992-09-03  |  1.9 KB  |  48 lines

  1. Newsgroups: comp.windows.x
  2. Path: sparky!uunet!das.wang.com!wang!news
  3. From: izeek@techunix.technion.ac.il (Ilan Aisic)
  4. Subject: Re: XPutPixel and and XGetPixel and image layout
  5. Reply-To: izeek@techunix.technion.ac.il (Ilan Aisic)
  6. Organization: Technion, Israel Inst. of Technology
  7. Date: Thu, 3 Sep 1992 16:47:04 GMT
  8. Message-ID: <1992Sep3.164704.4951@discus.technion.ac.il>
  9. References: <VICTOR.92Aug31135453@terse4.watson.ibm.com>
  10. Sender: news@wang.com
  11. Lines: 35
  12.  
  13. In article <VICTOR.92Aug31135453@terse4.watson.ibm.com> victor@watson.ibm.com writes:
  14. >I know that the standard "safe" way of writing and reading pixels in
  15. >an image is to use XPutPixel and XGetPixel.  However, for speed one
  16. >would like to read and write units (bytes, double bytes, quad bytes
  17. >and whatever) directly for speed.  Is there a reliable way of
  18. >determining what the layout of the image is?  I realize that,
  19. >theoretically, it doesn't need to be layed out by scan lines, with
  20. >possible padding, in which case all bets are off.  Is there a good way
  21. >of determining whether or not this is the case (via some X calls), and
  22. >if the image is layed out in a "standard" way to determine to
  23. >parameters: a) how much space a pixel takes up, b) is there padding at
  24. >the end of a scan line, and anything else that might be relevant.
  25. >
  26. >--
  27. >        Victor S. Miller
  28. >        Bitnet: VICTOR at WATSON
  29. >        Internet: victor@watson.ibm.com
  30. >        IBM, TJ Watson Research Center
  31. >        "Great artists steal; lesser artists borrow" Igor Stravinsky
  32.  
  33.  
  34. Well, why don't you use XGetImage, manipulate the whole rectangular,
  35. and then call XPutImage to lay it back on the drawable?
  36.  
  37.  
  38.     ____
  39.      /  /   __ 
  40.     /  /   /_/ /| /
  41.  __/_ /__ / / / |/   o o o
  42.  
  43.                            Ilan Aisic
  44.            Israel                                  USA
  45. Voice:   972-4-344474                         1-914-644-7710
  46. Fax:     972-4-342492                         1-914-644-7763
  47. E-mail:  izeek@techunix.technion.ac.il        ilan@allink.com
  48.