next up previous contents index
Next: Related file (external) types Up: Char Images Previous: Char Images   Contents   Index

The structure Cimage

Beginners should only focus on the first three fields of this structure. You should also consider the fields previous and next if your image is part of a movie. Some fields are not used this time, such firstcol ...lastrow, but future modules may access to them.

typedef struct cimage {
  int nrow;        /* Number of rows (dy) */
  int ncol;        /* Number of columns (dx) */
  unsigned char *gray;     /* The Gray level plane (may be NULL) */

  float scale;     /* Scale of the picture (should be 1 for original pict.) */
  char cmt[mw_cmtsize]; /* Comments */
  char name[mw_namesize]; /* Name of the image */
  /* Defines the signifiant part of the picture : */
  int firstcol;    /* index of the first col not affected by left side effect*/
  int lastcol;     /* index of the last col not affected by right side effect*/
  int firstrow;    /* index of the first row not aff. by upper side effect */  
  int lastrow;     /* index of the last row not aff. by lower side effect */  

  /* For use in Movies only */
  struct cimage *previous; /* Pointer to the previous image (may be NULL) */
  struct cimage *next; /* Pointer to the next image (may be NULL) */

} *Cimage;

Do not change by yourself the content of nrow and ncol: the size of the image has to be modified using functions of the library only (see section 2.1.3 page [*]).

mw 2004-05-05