gifimg.h File Reference

#include "../src/gd/gd.h"

Include dependency graph for gifimg.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void C2F() deallocategifimg (gdImagePtr *im)
void deallocateGifImg (gdImagePtr *im)
void C2F() readgifimg (char *string, gdImagePtr *imgptr, int *m, int *n, int *ncol)
void readGifImg (char *string, gdImagePtr *imgptr, int *m, int *n, int *ncol)
void C2F() readxbmimg (char *string, gdImagePtr *imgptr, int *m, int *n, int *ncol)
void readXbmImg (char *string, gdImagePtr *imgptr, int *m, int *n, int *ncol)
void C2F() getgifpixels (gdImagePtr *imgptr, unsigned char *pixels)
void getGifPixels (gdImagePtr *imgptr, unsigned char *pixels)
void C2F() getgifcmap (gdImagePtr *imgptr, unsigned char *cmap)
void getGifCmap (gdImagePtr *imgptr, unsigned char *cmap)


Function Documentation

void deallocateGifImg ( gdImagePtr im  ) 

Definition at line 10 of file gifimg.c.

References C2F, and deallocategifimg().

Referenced by sci_readgif(), and sci_readxbm().

00010 { C2F(deallocategifimg)( im ) ; }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() deallocategifimg ( gdImagePtr im  ) 

Definition at line 5 of file gifimg.c.

References gdImageDestroy().

Referenced by deallocateGifImg().

00006 {
00007   gdImageDestroy(*im);
00008 }

Here is the call graph for this function:

Here is the caller graph for this function:

void getGifCmap ( gdImagePtr imgptr,
unsigned char *  cmap 
)

Definition at line 94 of file gifimg.c.

References C2F, and getgifcmap().

00094 { C2F(getgifcmap)( imgptr, cmap ) ; }

Here is the call graph for this function:

void C2F() getgifcmap ( gdImagePtr imgptr,
unsigned char *  cmap 
)

Definition at line 78 of file gifimg.c.

References gdImageStruct::blue, gdImageStruct::colorsTotal, gdImageStruct::green, i, and gdImageStruct::red.

Referenced by getGifCmap().

00079 {
00080   int i,k, ncol;
00081   gdImagePtr im;
00082   im = *imgptr;
00083   
00084   ncol = im->colorsTotal;
00085   k = 0;
00086   for (i=0; (i<ncol); i++) {
00087     cmap[k]        = im->red[i];
00088     cmap[ncol+k]   = im->green[i];
00089     cmap[2*ncol+k] = im->blue[i];
00090     k++;
00091   }
00092 }

Here is the caller graph for this function:

void getGifPixels ( gdImagePtr imgptr,
unsigned char *  pixels 
)

Definition at line 76 of file gifimg.c.

References C2F, and getgifpixels().

00076 { C2F(getgifpixels)( imgptr, pixels ) ; }

Here is the call graph for this function:

void C2F() getgifpixels ( gdImagePtr imgptr,
unsigned char *  pixels 
)

Definition at line 60 of file gifimg.c.

References i, m, n, gdImageStruct::pixels, gdImageStruct::sx, gdImageStruct::sy, x, and y.

Referenced by getGifPixels().

00061 {
00062   int i,m,n,x,y;
00063   gdImagePtr im;
00064   im = *imgptr;
00065   m = im->sx;
00066   n = im->sy;
00067   i =0;
00068   for (x=0; (x<m); x++) {       
00069     for (y=0; (y<n); y++) {
00070       pixels[i] = im->pixels[y][x];
00071       i++;
00072     }
00073   }
00074 }

Here is the caller graph for this function:

void readGifImg ( char *  string,
gdImagePtr imgptr,
int m,
int n,
int ncol 
)

Definition at line 34 of file gifimg.c.

References C2F, and readgifimg().

Referenced by sci_readgif().

00034 { C2F(readgifimg)( string, imgptr, m, n, ncol ) ; }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() readgifimg ( char *  string,
gdImagePtr imgptr,
int m,
int n,
int ncol 
)

Definition at line 12 of file gifimg.c.

References gdImageStruct::colorsTotal, fd, gdImageCreateFromGif(), m, n, sciprint(), string, gdImageStruct::sx, and gdImageStruct::sy.

Referenced by readGifImg().

00013 {
00014   FILE *fd;
00015   gdImagePtr im;
00016 
00017   fd=fopen(string,"r");
00018     if (fd == 0) 
00019       {
00020         sciprint("Can't open file %s\n",string);
00021         return;
00022       }
00023   im = gdImageCreateFromGif(fd);
00024   if (im == 0) {
00025     *m = *n = -1;
00026     return;
00027       }
00028   *m = im->sy;
00029   *n = im->sx;
00030   *ncol = im->colorsTotal;
00031   *imgptr =im;
00032 }

Here is the call graph for this function:

Here is the caller graph for this function:

void readXbmImg ( char *  string,
gdImagePtr imgptr,
int m,
int n,
int ncol 
)

Definition at line 58 of file gifimg.c.

References C2F, and readxbmimg().

Referenced by sci_readxbm().

00058 { C2F(readxbmimg)( string, imgptr, m, n, ncol ) ; }

Here is the call graph for this function:

Here is the caller graph for this function:

void C2F() readxbmimg ( char *  string,
gdImagePtr imgptr,
int m,
int n,
int ncol 
)

Definition at line 36 of file gifimg.c.

References gdImageStruct::colorsTotal, fd, gdImageCreateFromXbm(), m, n, sciprint(), string, gdImageStruct::sx, and gdImageStruct::sy.

Referenced by readXbmImg().

00037 {
00038   FILE *fd;
00039   gdImagePtr im;
00040 
00041   fd=fopen(string,"r");
00042     if (fd == 0) 
00043       {
00044         sciprint("Can't open file %s\n",string);
00045         return;
00046       }
00047   im = gdImageCreateFromXbm(fd);
00048   if (im == 0) {
00049     *m = *n = -1;
00050     return;
00051       }
00052   *m = im->sy;
00053   *n = im->sx;
00054   *ncol = im->colorsTotal;
00055   *imgptr =im;
00056 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Sun Mar 4 15:24:28 2007 for Scilab [trunk] by  doxygen 1.5.1