Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!mark From: mark@tut.cis.ohio-state.edu (Mark Jansen) Newsgroups: comp.sys.next Subject: animation on the next machine Message-ID: <54308@tut.cis.ohio-state.edu> Date: 10 Jul 89 04:34:32 GMT Reply-To: Mark Jansen Organization: Ohio State University Computer and Information Science Lines: 54 I am trying to do a simple animation on the NeXT machine, bitmaps seem to be the logical object to use but I'm having trouble, the 0.9 documentation is not complete. What would be the correct ways to do the following four simple operations. Here are my guesses. 1) read a tiff file into a bitmap char *flnm; Bitmap aBitmap; aBitmap = [ Bitmap newFromTIFF:flnm ]; 2) write a bitmap into a tiff file int fd; NXStream *img_stream; Bitmap aBitmap; img_stream NXOpenFile( fd, "w" ); [ aBitmap writeTIFF: img_stream ] the documentation says that what a stream is but how do I get one from a filename? Some C functions use something called a file descriptor of type int.(fd above)How do I get one of those? There is a c function to get a "typed stream" how is that different from an untyped stream? 3) write a bitmap to a view on the megapixel display NXPOINT scr_point; [ aBitmap composite:NX_COPY toPoint: scr_point ]; is that point the bitmap is sent to in world coordinates or in whatever is the focused view or window of the application this is running to? 4) read a bitmap from a view on the display this one I am really unsure of. Perhaps something like. PSsizeimage()? img_data = malloc() NXReadBitmap(x,y,dx,dy, dx,dy, 2, img_data) [ aBitmap readImage:img ]; What are the coordinates for these NX and PS functions, do they also use the focused view context or not? n are there better ways? should I skip the bitmap part and just use images and the C functions that manipulate images? Would that be significantly faster? I could use some help. I'm pretty stuck.