Open source remastering of the Freespace 2 engine
jpgutils.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <setjmp.h>
#include "jpeglib.h"
#include "globalincs/pstypes.h"
#include "jpgutils/jpgutils.h"
#include "cfile/cfile.h"
#include "bmpman/bmpman.h"
#include "palman/palman.h"
#include "graphics/2d.h"

Go to the source code of this file.


struct  cfile_source_mgr


#define INPUT_BUF_SIZE   4096
#define Jpeg_Set_Error(x)   { jpeg_error_code = x; }


typedef cfile_source_mgrcfile_src_ptr


void jpeg_cfile_src (j_decompress_ptr cinfo, CFILE *cfp)
void jpg_error_exit (j_common_ptr cinfo)
void jpg_output_message (j_common_ptr cinfo)
int jpeg_read_header (const char *real_filename, CFILE *img_cfp, int *w, int *h, int *bpp, ubyte *palette)
int jpeg_read_bitmap (const char *real_filename, ubyte *image_data, ubyte *palette, int dest_size, int cf_type)
void jpeg_cf_init_source (j_decompress_ptr cinfo)
boolean jpeg_cf_fill_input_buffer (j_decompress_ptr cinfo)
void jpeg_cf_skip_input_data (j_decompress_ptr cinfo, long num_bytes)
void jpeg_cf_term_source (j_decompress_ptr cinfo)


struct jpeg_decompress_struct jpeg_info
struct jpeg_error_mgr jpeg_err
jmp_buf FSJpegError

Macro Definition Documentation

#define INPUT_BUF_SIZE   4096

Definition at line 44 of file jpgutils.cpp.

#define Jpeg_Set_Error (   x)    { jpeg_error_code = x; }

Definition at line 49 of file jpgutils.cpp.

Typedef Documentation

Definition at line 40 of file jpgutils.cpp.

Function Documentation

boolean jpeg_cf_fill_input_buffer ( j_decompress_ptr  cinfo)

Definition at line 272 of file jpgutils.cpp.

void jpeg_cf_init_source ( j_decompress_ptr  cinfo)

Definition at line 262 of file jpgutils.cpp.

void jpeg_cf_skip_input_data ( j_decompress_ptr  cinfo,
long  num_bytes 

Definition at line 299 of file jpgutils.cpp.

void jpeg_cf_term_source ( j_decompress_ptr  cinfo)

Definition at line 316 of file jpgutils.cpp.

void jpeg_cfile_src ( j_decompress_ptr  cinfo,
CFILE cfp 

Definition at line 321 of file jpgutils.cpp.

int jpeg_read_bitmap ( const char *  real_filename,
ubyte image_data,
ubyte palette,
int  dest_size,
int  cf_type 

Definition at line 167 of file jpgutils.cpp.

int jpeg_read_header ( const char *  real_filename,
CFILE img_cfp,
int w,
int h,
int bpp,
ubyte palette 

Definition at line 99 of file jpgutils.cpp.

void jpg_error_exit ( j_common_ptr  cinfo)

Definition at line 56 of file jpgutils.cpp.

void jpg_output_message ( j_common_ptr  cinfo)

Definition at line 72 of file jpgutils.cpp.

Variable Documentation

jmp_buf FSJpegError

Definition at line 53 of file jpgutils.cpp.

struct jpeg_error_mgr jpeg_err

Definition at line 42 of file jpgutils.cpp.

struct jpeg_decompress_struct jpeg_info

Definition at line 41 of file jpgutils.cpp.