
#ifndef __MOBILEPHOTOTOOL__
#define __MOBILEPHOTOTOOL__

#include <cstdio>

#ifdef _MSC_VER
	#ifdef MPT_export
		#define DLL __declspec(dllexport)
	#else
		#define DLL __declspec(dllimport)
	#endif
#else
	#define DLL
#endif

#define MPT_SUCCESS		0
#define MPT_ERROR 		1


extern "C"
{
	DLL void *create_Reader(const char *file);

	DLL void delete_Reader(void *reader);

	DLL unsigned int get_PreviewWidth(void *reader);

	DLL unsigned int get_PreviewLength(void *reader);

	DLL unsigned int get_PreviewData(void *reader, unsigned int *data, size_t count);

	DLL unsigned int get_RawWidth(void *reader);

	DLL unsigned int get_RawLength(void *reader);

	DLL unsigned int get_RawData(void *reader, unsigned int *data, size_t count);

	DLL unsigned int get_ZoomWidth(void *reader);

	DLL unsigned int get_ZoomLength(void *reader);

	DLL unsigned int get_ZoomData(void *reader, unsigned int *data, size_t count);

	DLL int set_Zoom(void *reader, float zoom, int size[2]);

	DLL void get_zoom_image(	void *reader,
								unsigned int *data_out,
								unsigned int linestride,
								unsigned int width,
								unsigned int length,
								unsigned int out_x0,
								unsigned int out_y0,
								unsigned int in_x0,
								unsigned int in_y0);

	DLL int get_zoom_image_02(	void *reader,
									unsigned short *data_out,
									unsigned int linestride,
									unsigned int width,
									unsigned int length,
									unsigned int out_x0,
									unsigned int out_y0,
									unsigned int in_x0,
									unsigned int in_y0);
}

#endif
