home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics.animation
- Path: sparky!uunet!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!fstop.csc.ti.com!axis!mordor!rbeck
- From: rbeck@mordor.dseg.ti.com (Ron Beck)
- Subject: Image animation
- Message-ID: <1992Sep15.170112.26872@axis.dsg.ti.com>
- Sender: rbeck@mordor (Ron Beck)
- Reply-To: rbeck@mordor.dseg.ti.com
- Organization: When I get time...
- Date: Tue, 15 Sep 92 17:01:12 GMT
- Lines: 333
-
- I have found an *EXCELLENT* program to animate several .gif files. Here's
- a copy of the README. I pulled several weather satellite gifs and used
- the animation feature of this program and tracked Hurricane I???? a full 3
- days prior to it hitting Hawaii. I could see the eye of the hurricane and
- watch as it moved around the pacific. It was pretty "kick ass"! Once it
- loads all the pictures, the animation is really pretty fast. In fact, I
- had problems slowing it down so I could study the weather patterns better.
-
- If you like it and/or it will do what you want, thank the author (shown
- below). I don't know of anything for the PC (yet) but I'll keep my eyes
- open.
-
- Regards,
- Ron
-
- ************************* README of ImageMagick Program ***************
-
- AUTHOR
- The author is cristy@dupont.com. Comments, suggestions, or bug
- reports are welcome, but be kind.
- AVAILABLILITY
- Anonymous FTP at export.lcs.mit.edu, file contrib/ImageMagick.tar.Z.
- UNIX COMPILATION
- Type:
- uncompress ImageMagick.tar.Z
- tar xvf ImageMagick.tar
- cd ImageMagick
- xmkmf
- make Makefiles
- make
- If you do not have 'xmkmf', edit 'Makefile' as required by your
- hardware environment and type 'make'.
- Finally type:
- display images/aquarium.miff
- display -monochrome -dither images/aquarium.miff
- If the image colors are not correct use this command:
- display -visual default images/aquarium.miff
- You can find other example images in the 'images' directory.
- Be sure to read the manual pages for the display, animate, montage,
- XtoPS, import, mogrify, and convert utilities.
-
- The ImageMagick utilites read and write MIFF images. Refer to the
- end of this message for more information about MIFF. Use `convert'
- to convert images to and from the MIFF format.
-
- Some ImageMagick utilities recognizes these `alien' image formats:
- GIF
- JPEG
- Postscript
- PPM
- RLE
- SUN Raster
- TIFF
- VICAR
- X Bitmap
- X Window Dump
-
- and for your convenience automatically converts the alien image
- format to MIFF at execution time. However, the MIFF image format has
- several advantages over most image formats (i.e. runlength encoding,
- digital signature on an image colormap, etc.). ImageMagick is
- designed to exploit these advantages. Whenever possible convert an
- alien image format to the MIFF format before using the various
- ImageMagick programs.
-
- Other alien formats are also recognized. See CONVERT(1) for a list
- of valid image formats. You can specify a particular image format by
- prefixing the image filename with the image type and a colon (i.e.
- mtv:image.mtv).
-
- ImageMagick requires the Independent JPEG Group's software available via
- FTP as ftp.uu.net:graphics/jpeg/jpegsrc.v3.tar.Z to read the JPEG image
- format.
-
- ImageMagick requires Sam Leffler's TIFF software available via FTP as
- ftp.uu.net:graphics/tiff/v3.0.tar.Z to read the TIFF image format.
-
- To display images in the JPEG or TIFF format, get the JPEG and TIFF
- archives and build ImageMagick as follows:
-
- cd ImageMagick
- mkdir jpeg
- cd jpeg
- zcat jpegsrc.v3.tar.Z | tar xvf -
- cp jmemnobs.c jmemsys.c
- cp makefile.unix Makefile
- make libjpeg.a
- cd ..
- mkdir tiff
- cd tiff
- zcat v3.0.tar.Z | tar xvf -
- cd libtiff
- cp Makefile.sun Makefile
- make
- cd ../..
- < edit Imakefile and uncomment JPEG and TIFF lines as instructed >
- touch alien.c
- xmkmf
- make Makefiles
- make
-
- You can now display images in the JPEG or TIFF format.
-
- ImageMagick requires GNU's Ghostscript software available via FTP as
- ftp.uu.net:packages/gnu/ghostscript-2.5.tar.Z to read the Postscript
- format. For ImageMagick to read Postscript files, `gs' must be in
- your execution path.
-
-
- VMS COMPILATION
-
- Type
-
- @make
- set display/create/node=node_name::
-
- where node_name is the DECNET X server to contact.
-
- Finally type:
-
- display images/aquarium.miff
- display -monochrome -dither images/aquarium.miff
-
-
- ANIMATION
-
- An example animation sequence is available from anonymous FTP at
- export.lcs.mit.edu, file contrib/ImageMagick.animation.tar.Z Or
- alternatively, you can create this sequence yourself. Just look at
- README in the scenes directory.
-
- To prevent color flashing on visuals that have colormaps, `animate'
- creates a single colormap from the image sequence. This can be
- rather time consuming. You can speed this operation up by reducing
- the colors in the image before you `animate' them. Use `mogrify' to
- color reduce the images:
-
- mogrify -colors 256 scenes/dna.[0-9]*
-
- Note, the image sequence in ImageMagick.animation.tar.Z is already
- reduced. Alternatively, you can use a Standard Colormap; or a
- static, direct, or true color visual. You can define a Standard
- Colormap with `xstdcmap'. For example, to use the "best" Standard
- Colormap, type:
-
- xstdcmap -best
- animate -map best scenes/dna.[0-9]*
-
- or to use a true color visual:
-
- animate -visual truecolor scenes/dna.[0-9]*
-
- Image filenames can appear in any order on the command line if the
- scene keyword is specified in the MIFF image. Otherwise the images
- display in the order they appear on the command line. A scene is
- specified when converting from another image format to MIFF by using
- the "scene" option with any filter. Be sure to choose a scene number
- other than zero. For example, to convert a TIFF image to a MIFF
- image as scene #2, type:
-
- convert -scene 2 image.tiff miff:image.miff
-
-
- NOTES
-
- 1. If you get a compile error on XTextProperty in PreRvIcccm.h,
- change it to _XTextProperty. If you get a compile error on
- XVisualIDFromVisual in PreRvIcccm.c, change it to
- _XVisualIDFromVisual.
-
- 2. 24 bit images are reduced to 244 colors on an 8 bit display to
- help prevent colormap flashing. If you want all 256 colors, type
-
- display -colors 256 image.miff
-
- To further help reduce colormap flashing, do not install the
- default standard colormap (RGB_DEFAULT_MAP).
-
- 3. If you have an 8 bit server and need to look at a 24 bit image
- frequently, reduce the number of colors to 256 once and write to
- a new image. Then display this new image. For example,
-
- display -colors 256 -dither -write image.8bit image.24bit
- display image.8bit
-
- 4. Machine dependancies:
-
- For MacX, set the DISPLAY variable to host:0.2 for the color
- rootless window.
-
- I suspect all the following problems will be fixed when these
- vendors upgrade to X11R4. I find conditional compilation
- statements offensive. So if you have any of the following
- problems, the fix must be applied manually.
-
- MIPS does not always generate exposure events correctly when
- displaying a monochrome image on their color server. Holes in the
- image may appear when an area is blocked then exposed. I do not
- currently have a solution for this problem.
-
- Images do not dislay correctly on the IBM R6000 visual with 4096
- colors. However they do display correctly on the visual with 256
- colors. Until IBM fixes their server, type xdpyinfo to determine
- the ID of the 256 color visual and type
-
- display -visual 0x???? image.miff
-
- On the Stardent put
-
- *installColormap: on
-
- in your X resource file.
-
- To get ImageMagick to work on our SGI I had to comment out
-
- #include <X11/Xos.h>
-
- in X.h and include
-
- #define XEventsQueued(display,QueuedAfterFlush) XPending(display)
-
- I also included -DSYSV on the cc command line.
-
- IBM (RS/6000) and Digital (VMS) installed X11R4 include files but
- has X11R3 libraries. Therefore, include -DPRE_R4_ICCCM in your
- compile statement to force the R3 compatibilities routines to
- compile properly.
-
- Digital and Tektronix has a bug in their servers. When converting
- from LSBFirst to MSBFirst X server (or visa-versa) you may get the
- error
-
- Illegal unit size: 8 found in routine: _normalizeimagebits
-
- 5. On occasion, a window manager (twm) may get in strange state which will
- cause the display program to work improperly. Fix this by restarting the
- window manager.
-
- 6. If the image is displayed with incorrect colors, try using a different
- visual. Type xdpyinfo and choose an alternative visual (if one exists)
- by either visual class or visual id. For example, to specifically
- choose a PseudoColor visual on a server that supports it, type
-
- display -visual pseudocolor image.miff
-
- 7. Make sure that the include file math.h defines the function atof as
- type double. Otherwise the -gamma option will not work properly.
-
-
- MIFF IMAGE FORMAT
-
- MIFF is an image format, which I developed. I like it because it
-
- 1) It is machine independant. It can be read on virtually any
- computer. No byte swapping is necessary.
-
- 2) It has a text header. Most image formats are coded in binary
- and you cannot easily tell attributes about the image. Use
- 'more' on MIFF image files and the attributes are displayed in
- text form.
-
- 3) It can handle runlength-encoded images. Although most scanned
- images do not benefit from runlength-encoding, most
- computer-generated images do. Images of mostly uniform colors
- have a high compression ratio and therefore take up less memory
- and disk space.
-
- 4) It allows a scene number to be specified. This allows you to
- specify an animation sequence out-of-order on the command line.
- The correct order is determined by the scene number of each
- image.
-
- 5) MIFF computes a digital signature for colormapped images. This
- is useful for animating a sequence of images on a colormapped X
- server. If all signatures match in the image sequence,
- computing a global colormap is not necessary.
-
- One way to get an image into MIFF format is to use `convert'. or
- read it from an X window using the 'import' program. Alternatively,
- type the necessary header information in a file with a text editor.
- Next, dump the binary bytes into another file. Finally, type
-
- cat header binary_image | display -write image.miff -
-
- For example, suppose you have a raw red, green, blue image file on
- disk that is 640 by 480. The header file would look like this:
-
- id=ImageMagick columns=640 rows=480 :
-
- The image file would have red, green, blue tuples (rgbrgbrgb...).
-
- Refer to the 'display' manual page for more details.
-
- ACKNOWLEDGEMENTS
-
- o Dirk Wetzel <wetzel@forwiss.uni-erlangen.de> fixed the select statement
- in animate.c.
-
- o Eric Haines <erich@eye.com> fixed ReadRLEImage in alien.c. It previously
- did not check to see if the background color was present in the image.
-
-
- COPYRIGHT
-
- Copyright 1992 E. I. du Pont de Nemours & Company
-
- Permission to use, copy, modify, distribute, and sell this software and
- its documentation for any purpose is hereby granted without fee,
- provided that the above copyright notice appear in all copies and that
- both that copyright notice and this permission notice appear in
- supporting documentation, and that the name of E. I. du Pont de Nemours
- & Company not be used in advertising or publicity pertaining to
- distribution of the software without specific, written prior
- permission. E. I. du Pont de Nemours & Company makes no representations
- about the suitability of this software for any purpose. It is provided
- "as is" without express or implied warranty.
-
- E. I. du Pont de Nemours & Company disclaims all warranties with regard
- to this software, including all implied warranties of merchantability
- and fitness, in no event shall E. I. du Pont de Nemours & Company be
- liable for any special, indirect or consequential damages or any
- damages whatsoever resulting from loss of use, data or profits, whether
- in an action of contract, negligence or other tortious action, arising
- out of or in connection with the use or performance of this software.
-
-
- --
- ---------------------------------------------------------------------------
- Ronald J. Beck | IP rbeck@mordor.dseg.ti.com |Do now what others
- Member, Group Tech Staff | MaBell (214) 952-4566 |won't so you can do
- Texas Instruments | |later what others
- McKinney, Texas | |can't
- ---------------------------------------------------------------------------
-