Files
rawTherapee/rtengine/klt/pnmio.h
michael 3a4100e710 Merge with e190c52ab7861c68762aaa552f3dc0f59fe2e225 from default
This revision compiles and runs on Win7x64- but further evaluation is necessary.
There may be an issue with cmake step -After cmake I had to copy rtgui/version.h & config.h into out of source build /rtgui folder.
Additional notes:
- ImProcFunctions::hsv2rgb01   -> this likely need to be added to color.h & color.cc
- Use of array2D should be verified in NR code
- compilation warning for rtengine::RawImageSource::isWBProviderReady()
2012-07-03 23:15:07 -04:00

57 lines
1.1 KiB
C

/*********************************************************************
* pnmio.h
*********************************************************************/
#ifndef _PNMIO_H_
#define _PNMIO_H_
#include <cstdio>
/**********
* With pgmReadFile and pgmRead, setting img to NULL causes memory
* to be allocated
*/
/**********
* used for reading from/writing to files
*/
unsigned char* pgmReadFile(
const char *fname,
unsigned char *img,
int *ncols,
int *nrows);
void pgmWriteFile(
const char *fname,
const unsigned char *img,
int ncols,
int nrows);
void ppmWriteFileRGB(
const char *fname,
const unsigned char *redimg,
const unsigned char *greenimg,
const unsigned char *blueimg,
int ncols,
int nrows);
/**********
* used for communicating with stdin and stdout
*/
unsigned char* pgmRead(
FILE *fp,
unsigned char *img,
int *ncols, int *nrows);
void pgmWrite(
FILE *fp,
const unsigned char *img,
int ncols,
int nrows);
void ppmWrite(
FILE *fp,
const unsigned char *redimg,
const unsigned char *greenimg,
const unsigned char *blueimg,
int ncols,
int nrows);
#endif