#ifndef __MAIN_H
#define __MAIN_H
#ifdef cplusplus 
extern "C" {
#endif

#define OPD_ERROR_OK			0
#define OPD_ERROR_FILE_CORRUPT	-1
#define OPD_ERROR_NO_MEMORY		-2
#define OPD_ERROR_BAD_PARAMETER	-3
#define OPD_ERROR_UNSUPPORTED	-4

#ifndef FALSE
#define FALSE				0
#endif

#ifndef TRUE
#define TRUE				1
#endif

#ifndef UNSIGNED
#define	UNSIGNED			0
#endif
#ifndef SIGNED
#define SIGNED				1
#endif

int readBitmap(FILE *infile, opd_image_t *image);
int readJPEG(  FILE *infile, opd_image_t *image);

int writeBitmap(FILE *outfile, opd_image_t *image);
int	writeJPEG(  FILE *outfile, opd_image_t *image, int quality);

#ifdef cplusplus
};
#endif
#endif