//======================================================================================= // // template for still image processing // // templ_pgm.c // // developer: Henry Guennadi Levkin // // templ_pgm file.pgm // // result in res.pgm // //======================================================================================= #include "templ_pgm.h" //======================================================================================= // global variables FILE* gFp; // logging file int gW; // image width int gH; // image height byte* gpInp; // input image (from file) byte* gpOut; // output image //======================================================================================= void AllocateMem() { gpOut = malloc(gW * gH); } //======================================================================================= void FreeMem() { free(gpOut); free(gpInp); } //======================================================================================= void ImageCopy(byte* pInp, byte* pOut, int nWidth, int nHeight) { int i; int nSize = nWidth*nHeight; for(i=0; i