contrib/gel/vgel/kl/pnmio.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  * pnmio.h
00003  *********************************************************************/
00004 
00005 #ifndef _PNMIO_H_
00006 #define _PNMIO_H_
00007 
00008 #include <stdio.h>
00009 
00010 /**********
00011  * With pgmReadFile and pgmRead, setting img to NULL causes memory
00012  * to be allocated
00013  */
00014 
00015 /**********
00016  * used for reading from/writing to files
00017  */
00018 unsigned char* pgmReadFile(
00019   char *fname,
00020   unsigned char *img,
00021   int *ncols,
00022   int *nrows);
00023 void pgmWriteFile(
00024   char *fname,
00025   unsigned char *img,
00026   int ncols,
00027   int nrows);
00028 void ppmWriteFileRGB(
00029   char *fname,
00030   unsigned char *redimg,
00031   unsigned char *greenimg,
00032   unsigned char *blueimg,
00033   int ncols,
00034   int nrows);
00035 
00036 /**********
00037  * used for communicating with stdin and stdout
00038  */
00039 unsigned char* pgmRead(
00040   FILE *fp,
00041   unsigned char *img,
00042   int *ncols, int *nrows);
00043 void pgmWrite(
00044   FILE *fp,
00045   unsigned char *img,
00046   int ncols,
00047   int nrows);
00048 void ppmWrite(
00049   FILE *fp,
00050   unsigned char *redimg,
00051   unsigned char *greenimg,
00052   unsigned char *blueimg,
00053   int ncols,
00054   int nrows);
00055 
00056 #endif

Generated on Thu Jan 8 05:16:37 2009 for contrib/gel/vgel by  doxygen 1.5.1