fixed off-by-one bug
[swftools.git] / lib / jpeg.h
blobc6ef30b26e5bb327361bb34ce374fcbf529af521
1 #ifndef __jpeg_h__
2 #define __jpeg_h__
4 #include <stdio.h>
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 int jpeg_save(unsigned char*data, unsigned int width, unsigned int height, int quality, const char*filename);
11 int jpeg_save_gray(unsigned char*data, unsigned int width, unsigned int height, int quality, const char*filename);
12 int jpeg_save_to_file(unsigned char*data, unsigned int width, unsigned int height, int quality, FILE*fi);
13 int jpeg_save_to_mem(unsigned char*data, unsigned int width, unsigned int height, int quality, unsigned char*dest, int destsize);
14 int jpeg_load(const char*filename, unsigned char**dest, unsigned int*width, unsigned int*height);
15 int jpeg_load_from_mem(unsigned char*_data, int _size, unsigned char**dest, unsigned int*width, unsigned int*height);
16 void jpeg_get_size(const char *fname, unsigned int *width, unsigned int *height);
18 #ifdef __cplusplus
20 #endif
22 #endif