Program Slide Animation
Rules for a creation of show protocol
In the first line it has to be written the name of the file with a background music, a then a symbol '|' (vertical line) followed by five numbers separated by blank symbol. The first number is an index of picture which will be first in the second run of animation after the end of the first run. Then two number determines sizes of animation frame in pixels. All pictures will be shown in this frame. If the picture sizes will be greater the frame sizes, it will be cut off. If they will be smaller, then the picture will be placed according to the frame parameters. The sizes of the animation frame can be arbitrary, even on a full screen when the pictures will be shown on the grey background. Each new picture simply covers the preceding picture, so if new picture will have the sizes smaller than the sizes of preceding picture, the last picture will be partially shown. The next two numbers determines a shift of the left top corner of the animation frame relative to the left top corner of the screen. During the run of animation a position of the frame can be changed by usual technique. If the number are negative, the frame will be place at the centre of the screen.
The file of background music must be of MIDI (mid) type. The program internal player cannot play mp3 files, and the files of wav, au, aif types have a big size. All files are determined by URL address, i.e. it is a full file address either in the internet or in the local computer. There are examples of right address:
http://kohnvict.narod.ru/midi/In-Grid-In-Tango.mid
File:d:/SS/1/tango.mid
In the first example the file is placed in the internet on the my site in the folder /midi/. In the second example the file is placed on the local computer. In this case the address must be begins with (File:) followed by а full path of the file on the computer.
In the next lines the names of files with pictures should be determined, but after some of them there may be lines which points to place the text on the picture (see below). In the lines which point to the picture the first symbol must be "#", and then the file address, allowed format is as one of: GIF, JPG, PNG. Just after the file name and after a separator '|' the time of showing the picture in centiseconds must be written. In the same line one can determine the second number which will be determine a modification of the transition of this picture from the preceding picture. Now 12 modifications can be used which are determined by numbers from 1 to 12. The time of transition is 0.35 seconds for first 6 transitions and slightly larger for last 6 transitions (it depends on the power of computers). All transitions are described below
00 -- momentary transition
01 -- collapse of the old picture at the centre.
02 -- growth of the new picture from the centre
03 -- growth of the new picture from the left top corner
04 -- growth of the new picture from the left bottom corner
05 -- new picture falls down from top
06 -- new picture moves from left to right
07 -- new pictures is mixed with old picture with increasing weight
08 -- old picture becomes lees bright then new picture becomes more bright
09 -- new picture pushs out old one from the left
10 -- new picture pushs out old one from the right
11 -- new picture pushs out old one from the top
12 -- new picture pushs out old one from the bottom
If necessary, in this line two more numbers can be written. These two numbers (3-th and 4-th) determine a displacement of the picture centre from the centre of the animation frame. If they are absent then the picture are placed at the centre of the animation frame. The displacement has to be determined for each picture. It means a shift of the picture centre from the frame centre.
There is something more. After the displacement one can write three more numbers: 5-th, 6-th and 7-th. These numbers determine a dynamics of changing the picture during the show which is made by showing new pictures. These new pictures will be obtained from the initial picture by either scaling or showing with a shift. 5-th number determine the time of frame change in centiseconds. If it equals zero nothing happens. 6-th number determines the number of pixels, it can be positive or negative. 7-th number can be 0, 1 or 2. If it is 0 or absent then the sizes of picture will be changed. In this case 6-th number determines the number of pixels for a change of the vertical size per one step. The time of showing does not take into account the time of formation of new picture, but this time may be rather large, so an optimization of parameters must be made empirically. But one rule exists that total number of steps is equal to a ratio of total time of show and time per one step.
If 7-th number equals 1, then the picture will move from left to right or from right to left depending on the sign of displacement. For a right show the initial picture must have the horizontal size larger than the size of frame on the quantity S*N where S is a parameter 6 without a sign (absolute value), N is a total number of step as a ratio of total time of show T and time per one step D. The time per one step can be minimal, i.e. 1 and S can be 1 also. In this case if the horizontal size of the frame is 800, then the size of picture must be 800+T. Moreover the initial place of picture must be shifted on T/2 in another side. To make a show in 2 times slower is possible if to choose T and D two times larger simultaneously. If 7-th number equals 2 then all will be the same except a direction of moving. Now it is from top to bottom or from bottom to top depending on the sign of shifting.
The pictures may have arbitrary sizes and initially they are shown as is, i.e. without scaling. Therefore very large pictures will be cut off. Therefore it is better to scale the picture before showing. This may be done by means of operations of this program or with a use of special programs. One of them can be found on the site
"http://www.realfiletools.com/free/photo-resize.htm".
In some lines one can determine the instruction for a placement of the text without background on the preceding picture, i.e. in the transparent mode. In reality the text will be simply drawn on the picture. To make this it is necessary to place the line of special kind just after the picture's line. These line can exists many times, each line per one line of text on the picture. The structure of the line is as follows
text=xxxxxxxxx| T S X Y R G B K
Here instead of xxxxx the text itself must be placed which will be shown. The letters define integer numbers as parameters, namely:
T - the time of showing in centiseconds (0.01 sec)
S - size of the Font in pixels
X Y - coordinates of the left bottom corner in pixels
R G B - red, green, blue components of the color from 0 to 255
K - kind of the text, allowed values 0 - normal, 1 - bold, 2 - italic, 3 - bold italic
The Font is fixed as "Sans Serif" and cannot be changed.
Each new line will add to picture one line of text with saving preceding lines of text. So one can create an effect of stepwice appearing the text.
The important notes: (1) the text is placed on the picture but not the frame. (2) the text will be placed after a stop of all motions. The reason is the program fulfils the operation after a stop of preceding operation. Therefore don't place the text on a moving pictures.
Driving the show by hand
During the show in the stationary phase (after the transitions) the program waits the signals from a keyboard. It can change the process depending on these signals. Below a list of all keyboard signals is shown
[Esc] -- exit from show
[Enter] -- stop of show, the program stops background music and waits a second signal, after that the show will continue, but the background music will play from the beginning
[Arrow to top] -- move back for one frame back
[Arrow to left] -- move back for two frames back
[Backspace] -- move back for three frames back
[Page Up] -- move back for four frames back
[Page Down] -- move forward for five frames
[C] -- turn off background music
[O] -- turn on background music after turn off
[Home] -- jump to the beginning
[End] -- jump to the end, then переход в самый конец, после чего можно крутить назад
[Any other key] -- move forward for one frames