/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/

#ifndef __GB_JPEG_H__
#define __GB_JPEG_H__

/***********************************************************************
 jpeg compress
************************************************************************/
unsigned char * jpeg_compress(
	int * ret_jpeg_length,
	unsigned char * rgb_32bit_data,
	int width,
	int height,
	int quality /* 0-100 (low - high) */);

/***********************************************************************
 jpeg uncompress
************************************************************************/
unsigned char * jpeg_uncompress(
	int * ret_width,
	int * ret_height,
	unsigned char * jpeg_data,
	int jpeg_length);

unsigned char * none_compress(
	int * ret_jpeg_length,
	unsigned char * rgb_32bit_data,
	int width,
	int height);

unsigned char * none_uncompress(
	int * ret_width,
	int * ret_height,
	unsigned char * jpeg_data,
	int jpeg_length);



#endif
