#ifndef __CHIPMONK_UTILITIES_H__
#define __CHIPMONK_UTILITIES_H__

#include <vector>
#include <string>
#include "IplImage.h"

using namespace std;

BOOL OpenJPG2Gray(UCHAR* pData, UINT uBufferSize, 
		UINT& uOrigWidth, UINT& uOrigHeight, 
		BOOL bColor, BOOL bTrim2Mult8, 
		IplImage** ppDest);

//#define __WRITE_LOG__

#ifdef __WRITE_LOG__
void WriteLogString(const string & s) ;
void WriteLogString(const wstring & ws) ;
void WriteLogInt(int n) ;
#define WriteStringToLog(s) WriteLogString(s) 
#define WriteIntToLog(n) WriteLogInt(n) 
#else
#define WriteStringToLog(s)
#define WriteIntToLog(n) 
#endif

int FindEndOfSentence(const wstring & s, int nStartPos = 0);

void convChar2Wchar ( const unsigned char* string, unsigned short* wString);
void WStr2Str(const wstring & ws, string & s);
void Str2WStr(const string & s, wstring & ws);

#endif  //__CHIPMONK_UTILITIES_H__

