Main Page   Modules   Compound List   File List   Compound Members   File Members  

movie.h File Reference

#include <gandalf/image/io/image_io.h>

Go to the source code of this file.

Compounds

struct  Gan_MovieStruct
 Image sequence structure. More...


Typedefs

typedef Gan_MovieStruct Gan_MovieStruct
 Image sequence structure.


Functions

Gan_MovieStructgan_movie_new (const char *directory, const char *basename, int no_digits, const char *suffix, int first, int no_images, Gan_ImageFileFormat file_format)
 Create new movie structure for image sequence I/O.

void gan_movie_set_step (Gan_MovieStruct *movie, int step)
 Sets step attribute of movie structure.

void gan_movie_set_crop_window (Gan_MovieStruct *movie, int crop_left, int crop_right, int crop_top, int crop_bottom)
 Sets crop window attribute of movie structure.

void gan_movie_free (Gan_MovieStruct *movie)
 Frees a movie structure.

char * gan_movie_image_name (Gan_MovieStruct *movie, int number, char *string, unsigned slen)
 Builds the full name of an image in a movie.

Gan_Imagegan_movie_image_read (Gan_MovieStruct *movie, int number, Gan_Image *image)
 Reads an image from an image sequence.

Gan_Bool gan_movie_image_write (Gan_MovieStruct *movie, int number, Gan_Image *image)
 Writes an image to an image sequence.


Detailed Description

Module: Image movie definitions and functions

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Function Documentation

void gan_movie_free Gan_MovieStruct   movie
 

Frees a movie structure.

Parameters:
movie Pointer to the movie structure to free
Returns:
No value.
Frees a structure containing the specification of an image sequence.

See also:
gan_movie_new().

char* gan_movie_image_name Gan_MovieStruct   movie,
int    number,
char *    string,
unsigned    slen
 

Builds the full name of an image in a movie.

Parameters:
movie Pointer to a movie structure
number The number of the image in the sequence
string A string to be filled with the file name or NULL
slen The length of the provided string (zero if string is NULL)
Returns:
The filled file name as a string, or NULL on failure.
Builds and returns the full name of a specific image in a movie. If string is NULL, the string is malloc()'d and returned; otherwise the provided string is filled and returned. If the string is not long enough, NULL is returned.

slen defines the maximum length of the string, including the null terminator character, i.e. the total size of the string array.

See also:
gan_movie_image_read().

Gan_Image* gan_movie_image_read Gan_MovieStruct   movie,
int    number,
Gan_Image   image
 

Reads an image from an image sequence.

Parameters:
movie Pointer to a movie structure
number The number of the image in the sequence
image The image structure to read the image data into or NULL
Returns:
Pointer to image structure, or NULL on failure.
Reads a specific image file from an image movie into the provided image structure. If image is NULL a new image is dynamically allocated; otherwise the already allocated image structure is reused.

See also:
gan_movie_image_write().

Gan_Bool gan_movie_image_write Gan_MovieStruct   movie,
int    number,
Gan_Image   image
 

Writes an image to an image sequence.

Parameters:
movie Pointer to a movie structure
number The number of the image in the sequence
image The image structure to write to the file
Returns:
GAN_TRUE on successful write operation, GAN_FALSE on failure.
Writes an image structure into a specific image file from an image sequence.

See also:
gan_movie_image_read().

Gan_MovieStruct* gan_movie_new const char *    directory,
const char *    basename,
int    no_digits,
const char *    suffix,
int    first,
int    no_images,
Gan_ImageFileFormat    file_format
 

Create new movie structure for image sequence I/O.

Parameters:
directory The directory in which the image sequence is stored
basename The base name of the sequence
no_digits Number of digits in number field of file name
suffix String at end of each file name
first Number of first file in the sequence
no_images Number of images in the sequence
file_format File format of the image files
Returns:
Pointer to successfully created structure, or NULL on failure.
Builds and returns a pointer to a new structure containing the specification of an image sequence.

See also:
gan_movie_free().

void gan_movie_set_crop_window Gan_MovieStruct   movie,
int    crop_xlow,
int    crop_xhigh,
int    crop_ylow,
int    crop_yhigh
 

Sets crop window attribute of movie structure.

Parameters:
movie Pointer to movie structure
crop_xlow Low x-value of crop region
crop_xhigh High x-value of crop region
crop_ylow Low y-value of crop region
crop_yhigh High y-value of crop region
Returns:
No value.
Sets crop window attribute of movie structure created by gan_movie_new().

See also:
gan_movie_new().

void gan_movie_set_step Gan_MovieStruct   movie,
int    step
 

Sets step attribute of movie structure.

Parameters:
movie Pointer to movie structure
step Change in number between each frame of the sequence
Returns:
No value.
Sets step attribute of movie structure created by gan_movie_new(), i.e. the number change between adjacent frames in the sequence. The default is one.

See also:
gan_movie_new().


Generated on Mon Oct 13 16:14:45 2003 by doxygen1.3-rc1