Fisheries and Oceans Canada / Pêches et Océans Canada - Government of Canada / Gouvernement du Canada Fisheries and Oceans Canada / Pêches et Océans Canada - Government of Canada / Gouvernement du Canada
 
Français Contact Us Help Search Canada Site
Home What's New DFO National Site Map Media

Fisheries & Oceans
 
 
Maritimes Region
Fishing Industry
General Public
Marine & Oceans Industry
Media
Students and Teachers
Scientists and Researchers
 
AconIcon ACON       Home/Topics   |   Commands

Animation


The QuickTime animation commands include: QuickTime Close, QuickTime Copy Bitmap, QuickTime Frame, QuickTime New, and QuickTime Open.

To create QuickTime output, you must have QuickTime installed on your PC to access the supplied libraries. Similarly the user must have QuickTime installed on their PC to view any QuickTime movies.

The AVI animation commands include: AVI Close, AVI Frame, AVI New, and AVI Copy Bitmap.


QuickTime Close

This command is used to close a QuickTime movie.

After this command has been executed, you must execute another QuickTime_New() command before additional frames can be recorded.

QuickTime_Close();

See the example QuickTime Copy Buf.


QuickTime Copy Bitmap

This command is used to copy an image to the current movie frame.

This command may be used to reduce the time required to create a movie. If you first create an image (e.g.using PNG_Output) of the contents of the movie frame that remains constant between frames (e.g. the coastlines of a map), then copying the image instead of redrawing the whole frame each time may save considerable execution time. You can use any bitmap as the backdrop, onto which, you draw the frame specific graphics. The current contents of the frame buffer are replaced, so this should logically be the 1st command issued when drawing into a new QuickTime frame.

Currently as only 8 bit images are supported, you must choose a backdrop file with fewer than 256 colours if you want to be able to add additional unique colours during your own drawing commands.

There is 1 parameter:
file name - the name of the image file to copy as the first layer of the movie frame buffer.

QuickTime_Copy_Bitmap(file name);

See the example QuickTime Copy Buf.


QuickTime Frame

This command is used to save the graphics on the screen as the next frame within a QuickTime movie.

After the QuickTime_New() command has been executed, at any point in time, all graphics currently in the graph window may be stored as a single frame in the QuickTime movie by issuing the QuickTime_Frame() command. By drawing addiitional graphics, and recording them in successive frames, a QuickTime movie may be created. The movie is closed using the QuickTime_Close() command.

If capturing graphics from the graph window, the first frame recorded, is used to determine the size of the movie frame. The movie will be made large enough to record all of the graphics on the screen when the 1st frame is recorded. It is up to the user to ensure that all subsequent frames are recorded within this initial frame.

When using an offscreen buffer, the buffer is automatically cleared by the QuickTime_Frame command. An simplistic sequence might be:

QuickTime_New("myfile");
Draw_Text(mm(30),mm(150),"Test");
QuickTime_Frame();
Next_Page(); /* erase the screen to start a fresh image, NOT NEEDED if drawing to an offscreen buffer */
Draw_Text(mm(30),mm(150),"Hello");
QuickTime_Frame();
Draw_Text(mm(30),mm(140),"World");
QuickTime_Frame();
QuickTime_Close();

QuickTime_Frame();

See the example QuickTime Copy Buf.


QuickTime New

This command is used to open a new QuickTime movie. The name of the new movie file to create is specified.

After this command has been executed, at any point in time, all graphics currently in the graph window may be stored as a single frame in the QuickTime movie by issuing the QuickTime_Frame() command. By drawing addiitional graphics, and recording them in successive frames, a QuickTime movie may be created. The movie is closed using the QuickTime_Close() command.

As an option, the graphics may be drawn directly into an offscreen buffer, similar to PNG_output(), rather than drawing to the graphics window, and then capturing the graph window using the QuickTime_Frame command. With this option the graphics are limited to 256 separate colours. [This optional syntax must be used with the console version of ACON, where a graphics window is not available to capture the graphics from.]

Recent versions of ACON (8.27+) automatically create a single-fork flattened movie file.

There are 1 or more parameters:
file name - the name of the QuickTime movie to create.
frames per second - (optional) the number of frames per second (default 10).
bits per pixel - (optional) the number of bits per pixel (default 8, maximum 8).
use offscreen buffer - (optional) 1 if an offscreen buffer is to be used (default 0).
buffer width - (optional) width of the offscreen buffer in pixels (default 640).
buffer width - (optional) height of the offscreen buffer in pixels (default 480).

QuickTime_New("file name");

QuickTime_New("myMovie",0.5);

See the example QuickTime Copy Buf.


QuickTime Open

This command is used to open an existingQuickTime movie. The name of the movie file to open is specified. A separate window will open containing the QuickTime movie and a controller to play the movie.

There is 1 parameter:
file name - the name of the QuickTime movie to open.

QuickTime_Open("file name");

QuickTime_Open("myMovie");

See the example QuickTime Copy Buf.


AVI Close

This command is used to close a AVI movie.

After this command has been executed, you must execute another AVI_New() command before additional frames can be recorded.

AVI_Close();


AVI Frame

This command is used to save the graphics in the movie frame buffer as the next frame within a AVI movie.

After the AVI_New() command has been executed, at any point in time, all graphics currently in the movie frame buffer may be stored as a single frame in the QuickTime movie by issuing the AVI_Frame() command. By drawing addiitional graphics, and recording them in successive frames, a AVI movie may be created. The movie is closed using the AVI_Close() command.

The size of the movie frame is specified as part of the AVI_New() command. It is up to the user to ensure that all of the graphics are recorded within this frame.

When using an offscreen buffer, the buffer is automatically cleared by the QuickTime_Frame command.

A simplistic sequence might be:

AVI_New("C:/myfile.avi",600,400,10);
Draw_Text(mm(30),mm(50),"Test");
AVI_Frame(); /* capture the buffer, and erase the buffer to start a fresh image */
Draw_Text(mm(30),mm(50),"Hello");
AVI_Frame();
Draw_Text(mm(30),mm(50),"Hello");
Draw_Text(mm(30),mm(40),"World");
AVI_Frame();
AVI_Close();

AVI_Frame();


AVI New

This command is used to open a new AVI movie. The name of the new movie file to create is specified.

After this command has been executed, at any point in time, all graphics currently in the offscreen buffer may be stored as a single frame in the AVI movie by issuing the AVI_Frame() command. By drawing addiitional graphics, and recording them in successive frames, a AVI movie may be created. The movie is closed using the AVI_Close() command.

The graphics are drawn directly into an offscreen buffer, similar to PNG_output(), rather than drawing to the graphics window. Graphics are limited to 256 separate colours.

There are 1 or more parameters:
file name - the name of the AVI movie to create.
buffer width - (optional) width of the offscreen buffer in pixels (default 640).
buffer width - (optional) height of the offscreen buffer in pixels (default 480).
frames per second - (optional) the number of frames per second (default 10).

AVI_New("filename");

AVI_New("myMovie",0.5);


AVI Copy Bitmap

This command is used to copy an image to the current movie frame.

This command may be used to reduce the time required to create a movie. If you first create an image (e.g. using PNG_Output) of the contents of the movie frame that remains constant between frames (e.g. the coastlines of a map), then copying the image instead of redrawing the whole frame each time may save considerable execution time. You can use any bitmap as the backdrop, onto which, you draw the frame specific graphics. The current contents of the frame buffer are replaced, so this should logically be the 1st command issued when drawing into a new QuickTime frame.

There is 1 parameter:
file name - the name of the image file to copy as the first layer of the movie frame buffer.

AVI_Copy_Bitmap(file name);

AVI_Copy_Bitmap("myMovie");


AconIcon ACON       Home/Topics   |   Commands



Last Modified : 2005-11-14