64 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) 78 fprintf(stderr,
" Compiled with libpng %s; using libpng %s.\n",
80 fprintf(stderr,
" Compiled with zlib %s; using zlib %s.\n",
95 fread(sig, 1, 8, infile);
182 *red = pBackground->red >> 8;
183 *green = pBackground->green >> 8;
184 *blue = pBackground->blue >> 8;
187 *red = *green = *blue = pBackground->gray? 255 : 0;
189 *red = *green = *blue = (255/3) * pBackground->gray;
191 *red = *green = *blue = (255/15) * pBackground->gray;
193 *red = (
uch)pBackground->red;
194 *green = (
uch)pBackground->green;
195 *blue = (
uch)pBackground->blue;
270 Trace((stderr,
"readpng_get_image: channels = %d, rowbytes = %ld, height = %ld\n", *pChannels, rowbytes, height));
#define png_jmpbuf(png_ptr)
GLint GLint GLsizei GLsizei height
PNG_CONST char png_libpng_ver[18]
png_infop PNGAPI png_create_info_struct(png_structp png_ptr)
png_uint_32 PNGAPI png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
png_color_16 FAR * png_color_16p
#define PNG_COLOR_TYPE_GRAY_ALPHA
#define PNG_COLOR_TYPE_PALETTE
png_uint_32 PNGAPI png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
#define PNG_LIBPNG_VER_STRING
GLint GLint GLsizei width
void PNGAPI png_set_sig_bytes(png_structp png_ptr, int num_bytes)
void PNGAPI png_set_strip_16(png_structp png_ptr)
png_byte FAR *FAR * png_bytepp
png_infop png_bytepp row_pointers
png_struct FAR * png_structp
void PNGAPI png_read_end(png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_type, int *compression_type, int *filter_type)
uch * readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
#define PNG_COLOR_TYPE_GRAY
void PNGAPI png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
int PNGAPI png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
void PNGAPI png_read_info(png_structp png_ptr, png_infop info_ptr)
void readpng_version_info(void)
png_structp PNGAPI png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)
void PNGAPI png_set_expand(png_structp png_ptr)
png_uint_32 PNGAPI png_get_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p *background)
void PNGAPI png_read_image(png_structp png_ptr, png_bytepp image)
int readpng_get_bgcolor(uch *red, uch *green, uch *blue)
unsigned long png_uint_32
png_uint_32 PNGAPI png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
void readpng_cleanup(int free_image_data)
void PNGAPI png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)
void PNGAPI png_read_update_info(png_structp png_ptr, png_infop info_ptr)
int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight)
void PNGAPI png_init_io(png_structp png_ptr, png_FILE_p fp)
png_byte PNGAPI png_get_channels(png_structp png_ptr, png_infop info_ptr)
void PNGAPI png_set_gray_to_rgb(png_structp png_ptr)