#ifndef __MYPNG_H__ #define __MYPNG_H__ #include #include #include #define PNG_WIDTH 4 #define PNG_COMPONENTS 3 struct pngdata { int width, height; png_bytep *rows; }; /* * Amplifying each component of every pixel by a given coefficient. * * 'coeff' must be divided by 256 to get the real amplification * coefficient. */ void png_amplify(struct pngdata *pp, unsigned int coeff); int png_write(const char *filename, struct pngdata *data); const char * png_read_8bit_rgb(const char *filename, struct pngdata *data); void png_destroy(struct pngdata *p_pd); void png_allocate(struct pngdata *p_pd); void png_copy(struct pngdata *src, struct pngdata *dest); #endif /* !defined(__MYPNG_H__) */