rgbe.h File Reference

Utilities for reading and writing Ward's rgbe image format. More...

#include <stdio.h>

Go to the source code of this file.

Classes

struct  rgbe_header_info

Defines

#define RGBE_VALID_PROGRAMTYPE   0x01
#define RGBE_VALID_GAMMA   0x02
#define RGBE_VALID_EXPOSURE   0x04
#define RGBE_RETURN_SUCCESS   0
#define RGBE_RETURN_FAILURE   -1

Functions

int RGBE_WriteHeader (FILE *fp, int width, int height, rgbe_header_info *info)
 writes headers
int RGBE_ReadHeader (FILE *fp, int *width, int *height, rgbe_header_info *info)
 reads headers
int RGBE_WritePixels (FILE *fp, const float *data, int numpixels)
 writes pixels
int RGBE_ReadPixels (FILE *fp, float *data, int numpixels)
 reads pixels
int RGBE_WritePixels_RLE (FILE *fp, float *data, int scanline_width, int num_scanlines)
 writes run length encoded files
int RGBE_ReadPixels_RLE (FILE *fp, float *data, int scanline_width, int num_scanlines)
 reads run length encoded files


Detailed Description

Utilities for reading and writing Ward's rgbe image format.

Author:
Bruce Walter (http://www.graphics.cornell.edu/~bjw/)

Travis Fischer (fisch0920@gmail.com)

Date:
January 2009
Note:
This code is from http://www.graphics.cornell.edu/~bjw/rgbe/
also http://www.graphics.cornell.edu/online/formats/rgbe/

Definition in file rgbe.h.


Define Documentation

#define RGBE_RETURN_FAILURE   -1

Definition at line 43 of file rgbe.h.

#define RGBE_RETURN_SUCCESS   0

Definition at line 42 of file rgbe.h.

#define RGBE_VALID_EXPOSURE   0x04

Definition at line 39 of file rgbe.h.

#define RGBE_VALID_GAMMA   0x02

Definition at line 38 of file rgbe.h.

#define RGBE_VALID_PROGRAMTYPE   0x01

Definition at line 37 of file rgbe.h.


Function Documentation

int RGBE_ReadHeader ( FILE *  fp,
int *  width,
int *  height,
rgbe_header_info info 
)

reads headers

Note:
you may set rgbe_header_info to null if you want to

Definition at line 149 of file rgbe.cpp.

int RGBE_ReadPixels ( FILE *  fp,
float *  data,
int  numpixels 
)

reads pixels

Note:
can read pixels in chunks of any size including single pixels

Definition at line 232 of file rgbe.cpp.

int RGBE_ReadPixels_RLE ( FILE *  fp,
float *  data,
int  scanline_width,
int  num_scanlines 
)

reads run length encoded files

Note:
must be called to read whole scanlines

Definition at line 349 of file rgbe.cpp.

int RGBE_WriteHeader ( FILE *  fp,
int  width,
int  height,
rgbe_header_info info 
)

writes headers

Note:
you may set rgbe_header_info to null if you want to

Definition at line 124 of file rgbe.cpp.

int RGBE_WritePixels ( FILE *  fp,
const float *  data,
int  numpixels 
)

writes pixels

Note:
can write pixels in chunks of any size including single pixels

Definition at line 217 of file rgbe.cpp.

int RGBE_WritePixels_RLE ( FILE *  fp,
float *  data,
int  scanline_width,
int  num_scanlines 
)

writes run length encoded files

Note:
must be called to write whole scanlines

Definition at line 303 of file rgbe.cpp.


Generated on 28 Feb 2009 for Milton by doxygen 1.5.6