🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.misc
Article #1843

Re: looking at the bits in video frames (3.0 NeXT Dimension)

#1843
From: Ali Ozer
Date: Sun, 06 Sep 1992 01:18
25 lines
1909 bytes
In article <1992Sep3.090837.4884@cubetech.com> Andrew Loewenstern writes:
>In article <1992Sep1.033025.7164@news.media.mit.edu> mike@media-lab.mit.edu writes:
>> ... What I would like to do is simply get my hands on the pixel array
>>that underlies the NXCachedImageRep of a grabbed frame,
>>without copying and converting the whole frame.
>Try to use either NXReadBitmap() or NXBitmapImageRep's
>initData:fromRect: method (NeXT prefers NXBitmapImageRep).

Arrg. I posted a longer reply to this question but I don't think it ever made
it out. However, if you see another similar reply from me, apologies.

As Andrew says, NeXT prefers NXBitmapImageRep. Under 3.0 reading images back
from the window server has been speeded up, and you will see the most gain
if you use the NXBitmapImageRep class. Under 3.0, all images come back as
out-of-line messages (rather than as 64K buckets of bits, using "readimage").
Also, under 3.0, it is possible for the images to come back "unpacked" (with
non-standard bytes-per-row and bits-per-pixel values). This might seem like 
a problem, but as long as you pay attention to the bytesPerRow and 
bitsPerPixel params of the images, you will be fine.

Of course, if you app happens to be a 2.0 app, or you are using NXReadBitmap(),
you cannot take advantage of this second speedup as your app is probably not
prepared to deal with unpacked images. So, use NXBitmapImageRep!

Ali, Ali_Ozer@NeXT.com
Technical Details
Message-ID: <4932@rosie.NeXT.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!aozer
References: <1992Sep1.033025.7164@news.media.mit.edu> <1992Sep3.090837.4884@cubetech.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!aozer
From: aozer@next.com (Ali Ozer)
Newsgroups: comp.sys.next.misc,comp.sys.next.programmer
Subject: Re: looking at the bits in video frames (3.0 NeXT Dimension)
Message-ID: <4932@rosie.NeXT.COM>
Date: 6 Sep 92 01:18:23 GMT
References: <1992Sep1.033025.7164@news.media.mit.edu> <1992Sep3.090837.4884@cubetech.com>
Sender: news@NeXT.COM
Followup-To: comp.sys.next.misc
Organization: Next Computer, Inc.
Lines: 28