#ifndef HAVE_WRITE_PNG_H
#define HAVE_WRITE_PNG_H

#ifndef WRITE_DATA_ERROR
#  define WRITE_DATA_ERROR -1
#endif

#ifndef WRITE_DATA_OK
#  define WRITE_DATA_OK 0
#endif

/* Allow C++ Portability */
#ifdef __cplusplus
extern "C" {
#endif

/* write a png file */
extern int write_png(const char *file_name,      /* Name of file to be written */
	                 const unsigned char *datap, /* pointer to image data array */
					 int width, 			     /* Image width */
					 int height,  			     /* Image height */
					 int depth, 			     /* Image depth, valid values 1(mono), 3(RGB), 4(RGBA) */
					 const char *keyword, 		 /* tEXt Keyword to use in info (may be NULL) */
					 const char *description);	 /* tEXt string to use in info (may be NULL) */


/* Get/Set methods for control some basic save operations;
 * For each, values > 0 cause the action, <= 0 give library default operation */

/* Get/Set BGR to RGB translation state on save - may be useful with some Win32 data formats */
extern void set_png_bgr_state(int state);
extern int  get_png_bgr_state(void);

/* Get/Set monochrome b/w inversion state on save - may be useful for "negating" greyscale images */
extern void set_png_mono_invert_state(int state);
extern int  get_png_mono_invert_state(void);

/* Allow C++ Portability */
#ifdef __cplusplus
}
#endif

#endif /* HAVE_WRITE_PNG_H */

/* End of File */
