Tachyon (current)  Current Main Branch
imageio.h
Go to the documentation of this file.
1 /*
2  * imageio.h - This file deals with reading/writing image files
3  *
4  * (C) Copyright 1994-2022 John E. Stone
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * $Id: imageio.h,v 1.10 2022/02/18 17:55:28 johns Exp $
8  *
9  */
10 
11 /*
12  * For our puposes, we're interested only in the 3 byte per pixel 24 bit
13  * truecolor sort of file..
14  */
15 
16 #define IMAGENOERR 0
17 #define IMAGEBADFILE 1
18 #define IMAGEUNSUP 2
19 #define IMAGEALLOCERR 3
20 #define IMAGEREADERR 4
21 #define IMAGEWRITEERR 5
22 #define IMAGENULLDATA 6
24 int readimage(rawimage *);
25 int writeimage(char * name, int xres, int yres,
26  void *imgdata, int imgbufferformat, int fileformat);
27 void minmax_rgb96f(int xres, int yres, const float *fimg,
28  float *min, float *max);
29 void normalize_rgb96f(int xres, int yres, float *fimg);
30 void gamma_rgb96f(int xres, int yres, float *fimg, float gamma);
31 unsigned char * image_rgb48be_from_rgb96f(int xres, int yres, float *fimg);
32 unsigned char * image_rgb48bepl_from_rgb96f(int xres, int yres, float *fimg);
33 float * image_crop_rgb96f(int xres, int yres, float *fimg,
34  int szx, int szy, int sx, int sy);
35 unsigned char * image_crop_rgb24(int xres, int yres, unsigned char *img,
36  int szx, int szy, int sx, int sy);
void minmax_rgb96f(int xres, int yres, const float *fimg, float *min, float *max)
Definition: imageio.c:123
void normalize_rgb96f(int xres, int yres, float *fimg)
Definition: imageio.c:146
unsigned char * image_rgb48bepl_from_rgb96f(int xres, int yres, float *fimg)
Definition: imageio.c:282
void gamma_rgb96f(int xres, int yres, float *fimg, float gamma)
Definition: imageio.c:157
float * image_crop_rgb96f(int xres, int yres, float *fimg, int szx, int szy, int sx, int sy)
Definition: imageio.c:196
int writeimage(char *name, int xres, int yres, void *imgdata, int imgbufferformat, int fileformat)
Definition: imageio.c:321
unsigned char * image_crop_rgb24(int xres, int yres, unsigned char *img, int szx, int szy, int sx, int sy)
Definition: imageio.c:222
unsigned char * image_rgb48be_from_rgb96f(int xres, int yres, float *fimg)
Definition: imageio.c:248