Tachyon (current)  Current Main Branch
Macros | Functions
imageio.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "tachyon.h"
#include "parallel.h"
#include "util.h"
#include "imageio.h"
#include "ppm.h"
#include "psd.h"
#include "tgafile.h"
#include "jpeg.h"
#include "pngfile.h"
#include "sgirgb.h"
#include "winbmp.h"
#include "ui.h"

Go to the source code of this file.

Macros

#define TACHYON_INTERNAL   1
 

Functions

static int fakeimage (char *name, int *xres, int *yres, unsigned char **imgdata)
 
int readimage (rawimage *img)
 
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_rgb24_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)
 
unsigned char * image_rgb48be_from_rgb96f (int xres, int yres, float *fimg)
 
unsigned char * image_rgb48bepl_from_rgb96f (int xres, int yres, float *fimg)
 
int writeimage (char *name, int xres, int yres, void *img, int imgbufferformat, int fileformat)
 

Macro Definition Documentation

◆ TACHYON_INTERNAL

#define TACHYON_INTERNAL   1

Definition at line 20 of file imageio.c.

Function Documentation

◆ fakeimage()

static int fakeimage ( char *  name,
int *  xres,
int *  yres,
unsigned char **  imgdata 
)
static

Definition at line 35 of file imageio.c.

References IMAGENOERR, MSG_0, rt_mynode(), and rt_ui_message().

Referenced by readimage().

◆ 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_rgb24_from_rgb96f()

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

Definition at line 166 of file imageio.c.

Referenced by writeimage().

◆ 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 *  img)

◆ writeimage()

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