Wave++ QNX RTOS Corner :: phanimate
|
Lastest version is phanimate 1.1, released on Wed Oct 24 07:13:13 cet 2001
phanimate - ImageMagik's animate clone for Photonphanimate is an ImageMagik's animate clone for Photon. It can play any sequence of frames loaded from photon supported graphics files. You can specify the list of files by using stdin. When eof is reached, phanimate parses the list, loads all files into memory and start animating them. Various switches are supported to improve playback speed (which is always faster than animate however), and some in-animation keys are supported to fit your animating pursuits ;). phanimate is still simpler than animate (phanimate hasn't so many filters) but if you need something more just mail me.
Usage exampleI usually use phanimate to play the lastest Meteosat D2 pics. If you want to try it out immediately, go there and download a sequence of images:
ftp satpix.nottingham.ac.ukOnce done, pass the file list (generated by ls or anything else) to phanimate:
cd satpix/ARCHIVE/D2/17SEP01
mget *.jpg
ls *.jpg | phanimate -r -d 100 -w 600x600The -r flag will repeat the animation continuosly, -d sets a delay of 100 milliseconds instead of 1000, and -w resizes the images to a viewable 600x600 size. There are other options, see the usage instructions. Frames should have all the same size or the animation window will take the size of the bigger one. Also, keystrokes are parsed every delay milliseconds, so you may wait some istants before any action to occour. Dynamic loading issues
Since release 1.1 phanimate now supports dynamic loading of images. What does this mean? Pratically, by default phanimate loads all images into memory and then it displays them. By activating the dynamic loading (the -D switch) the image is loaded only at the time of displaying it. Once displayed, it will be immediately unloaded. In this way the ram needed to display the animation is at maximum the size of the bigger image avaible. However, since the image will be loaded on-demand, you will need more cpu to display the animation at high frame rates. So, where's the issue? Well, the PxLoadImage function has an internal bug that ignores the PX_QUERY flag. The function will load the image as usual instead of effectively querying the file. phanimate needs to query all the graphics files before loading them when dynamic loading is enabled unless you specify manually the size of the animation by using the -w switch. The right syntax for using the -D flag is:
phanimate -D -w WxH [addictional flags]Always use -w with -D for now. Why not introducing a workaround? Well, a possibility was to unload the file after querying it, but as the file will be effectively loaded entirely this will take as time as loading all the images twice! I will write a notice here when QSSL will fix this issue. The application won't need to be fixed. Screenshots Releases
A complete list of files is avaible here.
phanimate is released under the terms of GNU Lesser General Pulic License.
Back to main
This page is minimalist, simple and direct (and hopefully updated
frequently). Please respect my rights.
Copyright (c) 2001 Yuri D'Elia (Wave++) <wavexx@thregr.org>