home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.graphics.animation:49 comp.windows.x:16711 comp.windows.x.motif:6221
- Newsgroups: comp.graphics.animation,comp.windows.x,comp.windows.x.motif
- Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!cac.washington.edu!mattf
- From: mattf@cac.washington.edu (Matthew Freedman)
- Subject: Fast/Efficient 2D 1bit Animation in X/Motif?
- Message-ID: <1992Sep15.232759.9211@u.washington.edu>
- Followup-To: comp.graphics.animation
- Sender: news@u.washington.edu (USENET News System)
- Organization: U.W. Information Systems
- Date: Tue, 15 Sep 1992 23:27:59 GMT
- Lines: 36
-
- I am interested in doing some quick simple animation for my
- motif application. I have 30 xbm files which represent the
- frames of the animation. Currently I use an XmDrawingArea widget as the
- canvas. At program initialization I use XReadBitmapFile() read each
- frame in, and save an array of 30 pixmaps. When I want to animate, I
- XCopyArea() the next frame in every 200 milliseconds. With xbm files
- of about 10k, this works pretty well.
-
- However, I want to do another animation of about 30 frames, but this
- time each xbm will be over 100k. My application must run on
- X-Terminals and Mac/PCs with limited RAM available for the X-server.
- Already with the small animation, initializing the pixmaps has an
- overhead of about 500K (the entire rest of the application only
- increases server size by about 100k). It is clear that this scheme
- won't work with the larger frames.
-
- The only less memory-intensive way of doing the animation that I can
- see is to do the XReadBitmapFile for each frame as it is needed, and
- only have one Pixmap allocated. This will of course slow down the
- animation, possibly prohibitively. It also uses more network
- bandwidth.
-
- Are there any other alternatives? Is there a way of having the pixmaps
- cached in the application's memory (on a big machine with swap)
- instead of on the server (limited RAM)? Since the bitmaps are mostly
- whitespace, is there any way of using compression without a special
- server extension?
-
- Followups directed to comp.graphics.animation.
-
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- = Matthew M. Freedman =
- = U. of Washington Information Systems mattf@cac.washington.edu =
- = 4545 15th Ave. NE; 4th Floor (206) 543-5593 =
- = Seattle, WA 98105 =
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-