src/rcrt/textures/pngHelper.hxx File Reference

#include <png.h>
#include <cstdio>
#include <iostream>
#include <fstream>

Include dependency graph for pngHelper.hxx:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define PNG_BYTES_TO_CHECK   8
 I/O Helper Methods that provide a more convenient interface between the libpng I/O and a general purpose image buffer repreentation.

Functions

int check_if_png (const char *file_name, FILE **fp)
void read_png (const char *file_name, unsigned char *&buffer, int &width, int &height, int &channels, int &bit_depth, int &color_type, bool flip_vert)
void write_png (const char *file_name, unsigned char *buffer, int width, int height, int channels, int bit_depth, png_uint_32 color_type, bool flip_vert)


Define Documentation

#define PNG_BYTES_TO_CHECK   8

I/O Helper Methods that provide a more convenient interface between the libpng I/O and a general purpose image buffer repreentation.

by Christian Theobalt 2005

Definition at line 16 of file pngHelper.hxx.

Referenced by check_if_png().


Function Documentation

int check_if_png ( const char *  file_name,
FILE **  fp 
)

Definition at line 21 of file pngHelper.hxx.

References PNG_BYTES_TO_CHECK.

Referenced by read_png().

void read_png ( const char *  file_name,
unsigned char *&  buffer,
int &  width,
int &  height,
int &  channels,
int &  bit_depth,
int &  color_type,
bool  flip_vert 
)

Definition at line 41 of file pngHelper.hxx.

References check_if_png().

Referenced by rcrt::Image::ReadPNG().

void write_png ( const char *  file_name,
unsigned char *  buffer,
int  width,
int  height,
int  channels,
int  bit_depth,
png_uint_32  color_type,
bool  flip_vert 
)

Definition at line 173 of file pngHelper.hxx.

Referenced by rcrt::Image::WritePNG().


Generated on Thu Jan 31 19:30:57 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3