Files
rawTherapee/rtengine/klt/pnmio.h
Hombre 7e33f6520f Various corrections:
Wolfgang added to AUTHORS.txt
    PhenomX4 target added
    profiles version updated
    slightly enhanced Dark theme
    --large-adress-aware included in the example cmake option file
2011-05-02 00:08:38 +02:00

57 lines
1.0 KiB
C

/*********************************************************************
* pnmio.h
*********************************************************************/
#ifndef _PNMIO_H_
#define _PNMIO_H_
#include <stdio.h>
/**********
* With pgmReadFile and pgmRead, setting img to NULL causes memory
* to be allocated
*/
/**********
* used for reading from/writing to files
*/
unsigned char* pgmReadFile(
char *fname,
unsigned char *img,
int *ncols,
int *nrows);
void pgmWriteFile(
char *fname,
unsigned char *img,
int ncols,
int nrows);
void ppmWriteFileRGB(
char *fname,
unsigned char *redimg,
unsigned char *greenimg,
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,
unsigned char *img,
int ncols,
int nrows);
void ppmWrite(
FILE *fp,
unsigned char *redimg,
unsigned char *greenimg,
unsigned char *blueimg,
int ncols,
int nrows);
#endif