#include <png.h>
#include <cstdio>
#include <iostream>
#include <fstream>
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 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().
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 | |||
) |