Tachyon (current)  Current Main Branch
Macros | Functions
imageio.h File Reference

Go to the source code of this file.

Macros

#define IMAGENOERR   0
 no error More...
 
#define IMAGEBADFILE   1
 can't find or can't open the file More...
 
#define IMAGEUNSUP   2
 the image file is an unsupported format More...
 
#define IMAGEALLOCERR   3
 not enough remaining memory to load this image More...
 
#define IMAGEREADERR   4
 failed read, short reads etc More...
 
#define IMAGEWRITEERR   5
 failed write, short writes etc More...
 
#define IMAGENULLDATA   6
 image to write was a null pointer More...
 

Functions

int readimage (rawimage *)
 
int writeimage (char *name, int xres, int yres, void *imgdata, int imgbufferformat, int fileformat)
 
void minmax_rgb96f (int xres, int yres, const float *fimg, float *min, float *max)
 
void normalize_rgb96f (int xres, int yres, float *fimg)
 
void gamma_rgb96f (int xres, int yres, float *fimg, float gamma)
 
unsigned char * image_rgb48be_from_rgb96f (int xres, int yres, float *fimg)
 
unsigned char * image_rgb48bepl_from_rgb96f (int xres, int yres, float *fimg)
 
float * image_crop_rgb96f (int xres, int yres, float *fimg, int szx, int szy, int sx, int sy)
 
unsigned char * image_crop_rgb24 (int xres, int yres, unsigned char *img, int szx, int szy, int sx, int sy)
 

Macro Definition Documentation

◆ IMAGEALLOCERR

#define IMAGEALLOCERR   3

not enough remaining memory to load this image

Definition at line 19 of file imageio.h.

◆ IMAGEBADFILE

#define IMAGEBADFILE   1

can't find or can't open the file

Definition at line 17 of file imageio.h.

Referenced by readppm(), readtga(), writeppm(), writeppm48(), and writepsd48().

◆ IMAGENOERR

#define IMAGENOERR   0

◆ IMAGENULLDATA

#define IMAGENULLDATA   6

image to write was a null pointer

Definition at line 22 of file imageio.h.

Referenced by writeimage().

◆ IMAGEREADERR

#define IMAGEREADERR   4

failed read, short reads etc

Definition at line 20 of file imageio.h.

Referenced by readimage(), readppm(), and readtga().

◆ IMAGEUNSUP

#define IMAGEUNSUP   2

the image file is an unsupported format

Definition at line 18 of file imageio.h.

Referenced by readimage(), readjpeg(), readpng(), readppm(), readtga(), writeimage(), writejpeg(), and writepng().

◆ IMAGEWRITEERR

#define IMAGEWRITEERR   5

failed write, short writes etc

Definition at line 21 of file imageio.h.

Referenced by createtgafile(), writeppm(), writeppm48(), and writetga().

Function Documentation

◆ gamma_rgb96f()

void gamma_rgb96f ( int  xres,
int  yres,
float *  fimg,
float  gamma 
)

Definition at line 157 of file imageio.c.

References POW.

Referenced by renderio().

◆ image_crop_rgb24()

unsigned char* image_crop_rgb24 ( int  xres,
int  yres,
unsigned char *  img,
int  szx,
int  szy,
int  sx,
int  sy 
)

Definition at line 222 of file imageio.c.

Referenced by renderio().

◆ image_crop_rgb96f()

float* image_crop_rgb96f ( int  xres,
int  yres,
float *  fimg,
int  szx,
int  szy,
int  sx,
int  sy 
)

Definition at line 196 of file imageio.c.

Referenced by renderio().

◆ image_rgb48be_from_rgb96f()

unsigned char* image_rgb48be_from_rgb96f ( int  xres,
int  yres,
float *  fimg 
)

Definition at line 248 of file imageio.c.

Referenced by writeimage().

◆ image_rgb48bepl_from_rgb96f()

unsigned char* image_rgb48bepl_from_rgb96f ( int  xres,
int  yres,
float *  fimg 
)

Definition at line 282 of file imageio.c.

Referenced by writeimage().

◆ minmax_rgb96f()

void minmax_rgb96f ( int  xres,
int  yres,
const float *  fimg,
float *  min,
float *  max 
)

Definition at line 123 of file imageio.c.

Referenced by normalize_rgb96f().

◆ normalize_rgb96f()

void normalize_rgb96f ( int  xres,
int  yres,
float *  fimg 
)

Definition at line 146 of file imageio.c.

References minmax_rgb96f().

Referenced by renderio().

◆ readimage()

int readimage ( rawimage *  )

◆ writeimage()

int writeimage ( char *  name,
int  xres,
int  yres,
void *  imgdata,
int  imgbufferformat,
int  fileformat 
)