dumpToGif

dumpToGif —

Synopsis




            ColorPacket;
            Image;
unsigned int dumpToGif_quantizeImage        (unsigned int number_colors,
                                             GString *buffer,
                                             voidDataFunc functionWait,
                                             gpointer data);
void        dumpToGif_syncImage             (void);
void        dumpToGif_setImage              (Image *data);

DumpType*   dumpToGif_init                  ();

Description

Details

ColorPacket

typedef struct {
  unsigned char red, green, blue;
  unsigned short index;
} ColorPacket;

A private structure used by the GIF conversion. It is usefull for all convertion from RGB to color table.

unsigned char red; red value ;
unsigned char green; green value ;
unsigned char blue; blue value.

Image

typedef struct {
  unsigned int columns, rows, colors;
  ColorPacket *colormap, *pixels, *packet;
  unsigned long packets;    
} Image;

A private structure used by the GIF conversion. It is usefull for all convertion from RGB to color table.

unsigned int columns; number of columns ;
unsigned int rows; number of rows ;
unsigned int colors; number of colours ;
ColorPacket *colormap; an array of colours ;
ColorPacket *pixels; the definition for each pixels ;
ColorPacket *packet; ??

dumpToGif_quantizeImage ()

unsigned int dumpToGif_quantizeImage        (unsigned int number_colors,
                                             GString *buffer,
                                             voidDataFunc functionWait,
                                             gpointer data);

This routine transform an RGB image to an indexed colours image. To set the image to quantize, use setImage().

number_colors : the number of desired colours ;
buffer : a string to store some error messages ;
functionWait : a method that will be called during the quantize process ;
data : an argument to give to the wait function.
Returns :

dumpToGif_syncImage ()

void        dumpToGif_syncImage             (void);

Do something in the GIF exoprt process.


dumpToGif_setImage ()

void        dumpToGif_setImage              (Image *data);

Set the image to be manipulated by the GIF convertor (see dumpToGif_quantizeImage()).

data :

dumpToGif_init ()

DumpType*   dumpToGif_init                  ();

This routine should not be used since it inialised the module and is already called when V_Sim is launched.

Returns :