home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / misc / 19335 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.9 KB

  1. Xref: sparky comp.sys.next.misc:19335 comp.sys.next.programmer:6012
  2. Path: sparky!uunet!rosie!aozer
  3. From: aozer@next.com (Ali Ozer)
  4. Newsgroups: comp.sys.next.misc,comp.sys.next.programmer
  5. Subject: Re: looking at the bits in video frames (3.0 NeXT Dimension)
  6. Message-ID: <4932@rosie.NeXT.COM>
  7. Date: 6 Sep 92 01:18:23 GMT
  8. References: <1992Sep1.033025.7164@news.media.mit.edu> <1992Sep3.090837.4884@cubetech.com>
  9. Sender: news@NeXT.COM
  10. Followup-To: comp.sys.next.misc
  11. Organization: Next Computer, Inc.
  12. Lines: 28
  13.  
  14. In article <1992Sep3.090837.4884@cubetech.com> Andrew Loewenstern writes:
  15. >In article <1992Sep1.033025.7164@news.media.mit.edu> mike@media-lab.mit.edu writes:
  16. >> ... What I would like to do is simply get my hands on the pixel array
  17. >>that underlies the NXCachedImageRep of a grabbed frame,
  18. >>without copying and converting the whole frame.
  19. >Try to use either NXReadBitmap() or NXBitmapImageRep's
  20. >initData:fromRect: method (NeXT prefers NXBitmapImageRep).
  21.  
  22. Arrg. I posted a longer reply to this question but I don't think it ever made
  23. it out. However, if you see another similar reply from me, apologies.
  24.  
  25. As Andrew says, NeXT prefers NXBitmapImageRep. Under 3.0 reading images back
  26. from the window server has been speeded up, and you will see the most gain
  27. if you use the NXBitmapImageRep class. Under 3.0, all images come back as
  28. out-of-line messages (rather than as 64K buckets of bits, using "readimage").
  29. Also, under 3.0, it is possible for the images to come back "unpacked" (with
  30. non-standard bytes-per-row and bits-per-pixel values). This might seem like 
  31. a problem, but as long as you pay attention to the bytesPerRow and 
  32. bitsPerPixel params of the images, you will be fine.
  33.  
  34. Of course, if you app happens to be a 2.0 app, or you are using NXReadBitmap(),
  35. you cannot take advantage of this second speedup as your app is probably not
  36. prepared to deal with unpacked images. So, use NXBitmapImageRep!
  37.  
  38. Ali, Ali_Ozer@NeXT.com
  39.  
  40.  
  41.  
  42.