Main Page Namespace List Class Hierarchy Alphabetical List Data Structures File List Namespace Members Data Fields Globals

# jpeglib.h File Reference

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <iostream.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include <math.h>`
`#include <malloc.h>`
`#include <tchar.h>`
`#include <windows.h>`

Go to the source code of this file.

## Data Structures
struct | jpeg_destination_mgr
struct | JHUFF_TBL
struct | jpeg_common_struct
struct | jpeg_component_info
struct | jpeg_compress_struct
struct | jpeg_decompress_struct
struct | jpeg_error_mgr
struct | jpeg_marker_struct
struct | jpeg_memory_mgr
struct | jpeg_progress_mgr
struct | jpeg_scan_info
struct | jpeg_source_mgr
struct | JQUANT_TBL
## Defines
#define | HAVE_PROTOTYPES
#define | HAVE_UNSIGNED_CHAR
#define | HAVE_UNSIGNED_SHORT
#define | HAVE_STDDEF_H
#define | HAVE_STDLIB_H
#define | BITS_IN_JSAMPLE 8
#define | MAX_COMPONENTS 10
#define | GETJSAMPLE(value) ((int) (value))
#define | MAXJSAMPLE 255
#define | CENTERJSAMPLE 128
#define | GETJOCTET(value) (value)
#define | JPEG_MAX_DIMENSION 65500L
#define | METHODDEF(type) static type
#define | LOCAL(type) static type
#define | GLOBAL(type) type
#define | EXTERN(type) extern type
#define | JMETHOD(type, methodname, arglist) type (*methodname) arglist
#define | FALSE 0
#define | TRUE 1
#define | JPEG_LIB_VERSION 62
#define | DCTSIZE 8
#define | DCTSIZE2 64
#define | NUM_QUANT_TBLS 4
#define | NUM_HUFF_TBLS 4
#define | NUM_ARITH_TBLS 16
#define | MAX_COMPS_IN_SCAN 4
#define | MAX_SAMP_FACTOR 4
#define | C_MAX_BLOCKS_IN_MCU 10
#define | D_MAX_BLOCKS_IN_MCU 10
#define | JDCT_DEFAULT JDCT_ISLOW
#define | JDCT_FASTEST JDCT_IFAST
#define | jpeg_common_fields
#define | JMSG_LENGTH_MAX 200
#define | JMSG_STR_PARM_MAX 80
#define | JPOOL_PERMANENT 0
#define | JPOOL_IMAGE 1
#define | JPOOL_NUMPOOLS 2
#define | JPP(arglist) arglist
#define | jpeg_create_compress(cinfo)
#define | jpeg_create_decompress(cinfo)
#define | JPEG_SUSPENDED 0
#define | JPEG_HEADER_OK 1
#define | JPEG_HEADER_TABLES_ONLY 2
#define | JPEG_REACHED_SOS 1
#define | JPEG_REACHED_EOI 2
#define | JPEG_ROW_COMPLETED 3
#define | JPEG_SCAN_COMPLETED 4
#define | JPEG_RST0 0xD0
#define | JPEG_EOI 0xD9
#define | JPEG_APP0 0xE0
#define | JPEG_COM 0xFE
## Typedefs
typedef unsigned char | JSAMPLE
typedef short | JCOEF
typedef unsigned char | JOCTET
typedef unsigned char | UINT8
typedef unsigned short | UINT16
typedef short | INT16
typedef unsigned int | JDIMENSION
typedef JSAMPLE FAR * | JSAMPROW
typedef JSAMPROW * | JSAMPARRAY
typedef JSAMPARRAY * | JSAMPIMAGE
typedef JCOEF | JBLOCK [DCTSIZE2]
typedef JBLOCK FAR * | JBLOCKROW
typedef JBLOCKROW * | JBLOCKARRAY
typedef JBLOCKARRAY * | JBLOCKIMAGE
typedef JCOEF FAR * | JCOEFPTR
typedef jpeg_marker_struct FAR * | jpeg_saved_marker_ptr
typedef jpeg_common_struct * | j_common_ptr
typedef jpeg_compress_struct * | j_compress_ptr
typedef jpeg_decompress_struct * | j_decompress_ptr
typedef jpeg_source_mgr | jpeg_source_mgr
typedef jvirt_sarray_control * | jvirt_sarray_ptr
typedef jvirt_barray_control * | jvirt_barray_ptr
## Enumerations
enum | J_COLOR_SPACE { JCS_UNKNOWN, JCS_GRAYSCALE, JCS_RGB, JCS_YCbCr, JCS_CMYK, JCS_YCCK }
enum | J_DCT_METHOD { JDCT_ISLOW, JDCT_IFAST, JDCT_FLOAT }
enum | J_DITHER_MODE { JDITHER_NONE, JDITHER_ORDERED, JDITHER_FS }
## Functions
typedef | JMETHOD (boolean, jpeg_marker_parser_method,(j_decompress_ptr cinfo))
| EXTERN (struct jpeg_error_mgr *) jpeg_std_error JPP((struct jpeg_error_mgr *err))
| EXTERN (void) jpeg_CreateCompress JPP((j_compress_ptr cinfo
| EXTERN (int) jpeg_quality_scaling JPP((int quality))
| EXTERN (JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo))
| EXTERN (JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo))
| EXTERN (JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo
| EXTERN (boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo))
| EXTERN (jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo))
## Variables
int | version
int size_t | structsize
FILE * | outfile
FILE * | infile
J_COLOR_SPACE | colorspace
int | quality
int boolean | force_baseline
int | scale_factor
int | which_tbl
int const unsigned int * | basic_table
boolean | suppress
boolean | write_all_tables
JSAMPARRAY | scanlines
JSAMPARRAY JDIMENSION | num_lines
JSAMPIMAGE | data
int | marker
int const JOCTET * | dataptr
int const JOCTET unsigned int | datalen
int | val
boolean | require_image
JSAMPARRAY JDIMENSION | max_lines
int | scan_number
int | marker_code
int unsigned int | length_limit
int jpeg_marker_parser_method | routine
jvirt_barray_ptr * | coef_arrays
j_compress_ptr | dstinfo
int | desired

## Define Documentation

#define BITS_IN_JSAMPLE 8

| Definition at line 205 of file jpeglib.h.

#define C_MAX_BLOCKS_IN_MCU 10

| Definition at line 579 of file jpeglib.h.

#define CENTERJSAMPLE 128

| Definition at line 256 of file jpeglib.h.

#define D_MAX_BLOCKS_IN_MCU 10

| Definition at line 581 of file jpeglib.h.

#define DCTSIZE 8

| Definition at line 565 of file jpeglib.h.

#define DCTSIZE2 64

| Definition at line 566 of file jpeglib.h.

#define EXTERN | ( | type |  | ) | extern type

| Definition at line 372 of file jpeglib.h.

#define FALSE 0

| Definition at line 412 of file jpeglib.h. Referenced by BEGIN_MESSAGE_MAP(), END_MESSAGE_MAP(), CSDKParticulesApp::InitInstance(), CSDKInterfaceApp::InitInstance(), CSDKConsolApp::InitInstance(), CExNihiloLauncherApp::InitInstance(), CAsc2MapApp::InitInstance(), ON_BN_CLICKED(), and ON_LBN_SELCHANGE().

#define GETJOCTET | ( | value |  | ) | (value)

| Definition at line 293 of file jpeglib.h.

#define GETJSAMPLE | ( | value |  | ) | ((int) (value))

| Definition at line 242 of file jpeglib.h.

#define GLOBAL | ( | type |  | ) | type

| Definition at line 370 of file jpeglib.h.

#define HAVE_PROTOTYPES

| Definition at line 65 of file jpeglib.h.

#define HAVE_STDDEF_H

| Definition at line 91 of file jpeglib.h.

#define HAVE_STDLIB_H

| Definition at line 95 of file jpeglib.h.

#define HAVE_UNSIGNED_CHAR

| Definition at line 70 of file jpeglib.h.

#define HAVE_UNSIGNED_SHORT

| Definition at line 71 of file jpeglib.h.

#define JDCT_DEFAULT JDCT_ISLOW

| Definition at line 748 of file jpeglib.h.

#define JDCT_FASTEST JDCT_IFAST

| Definition at line 751 of file jpeglib.h.

#define JMETHOD | ( | type,
|  | methodname,
|  | arglist |  | ) | type (*methodname) arglist

| Definition at line 382 of file jpeglib.h.

#define JMSG_LENGTH_MAX 200

| Definition at line 1178 of file jpeglib.h.

#define JMSG_STR_PARM_MAX 80

| Definition at line 1186 of file jpeglib.h.

#define JPEG_APP0 0xE0

| Definition at line 1580 of file jpeglib.h.

#define JPEG_COM 0xFE

| Definition at line 1581 of file jpeglib.h.

#define jpeg_common_fields

| Value:
    struct jpeg_error_mgr * err;     \
      struct jpeg_memory_mgr * mem;  \
      struct jpeg_progress_mgr * progress;  \
      void * client_data;            \
      boolean is_decompressor;       \
      int global_state
Definition at line 765 of file jpeglib.h.

#define jpeg_create_compress | ( | cinfo |  | ) |

| Value:
    jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \
                            (size_t) sizeof(struct jpeg_compress_struct))
Definition at line 1425 of file jpeglib.h.

#define jpeg_create_decompress | ( | cinfo |  | ) |

| Value:
    jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \
                              (size_t) sizeof(struct jpeg_decompress_struct))
Definition at line 1428 of file jpeglib.h.

#define JPEG_EOI 0xD9

| Definition at line 1579 of file jpeglib.h.

#define JPEG_HEADER_OK 1

| Definition at line 1497 of file jpeglib.h.

#define JPEG_HEADER_TABLES_ONLY 2

| Definition at line 1498 of file jpeglib.h.

#define JPEG_LIB_VERSION 62

| Definition at line 557 of file jpeglib.h.

#define JPEG_MAX_DIMENSION 65500L

| Definition at line 355 of file jpeglib.h.

#define JPEG_REACHED_EOI 2

| Definition at line 1528 of file jpeglib.h.

#define JPEG_REACHED_SOS 1

| Definition at line 1527 of file jpeglib.h.

#define JPEG_ROW_COMPLETED 3

| Definition at line 1529 of file jpeglib.h.

#define JPEG_RST0 0xD0

| Definition at line 1578 of file jpeglib.h.

#define JPEG_SCAN_COMPLETED 4

| Definition at line 1530 of file jpeglib.h.

#define JPEG_SUSPENDED 0

| Definition at line 1496 of file jpeglib.h.

#define JPOOL_IMAGE 1

| Definition at line 1280 of file jpeglib.h.

#define JPOOL_NUMPOOLS 2

| Definition at line 1281 of file jpeglib.h.

#define JPOOL_PERMANENT 0

| Definition at line 1279 of file jpeglib.h.

#define JPP | ( | arglist |  | ) | arglist

| Definition at line 1349 of file jpeglib.h.

#define LOCAL | ( | type |  | ) | static type

| Definition at line 368 of file jpeglib.h.

#define MAX_COMPONENTS 10

| Definition at line 217 of file jpeglib.h.

#define MAX_COMPS_IN_SCAN 4

| Definition at line 570 of file jpeglib.h.

#define MAX_SAMP_FACTOR 4

| Definition at line 571 of file jpeglib.h.

#define MAXJSAMPLE 255

| Definition at line 255 of file jpeglib.h.

#define METHODDEF | ( | type |  | ) | static type

| Definition at line 366 of file jpeglib.h.

#define NUM_ARITH_TBLS 16

| Definition at line 569 of file jpeglib.h.

#define NUM_HUFF_TBLS 4

| Definition at line 568 of file jpeglib.h.

#define NUM_QUANT_TBLS 4

| Definition at line 567 of file jpeglib.h.

#define TRUE 1

| Definition at line 415 of file jpeglib.h. Referenced by BEGIN_MESSAGE_MAP(), END_MESSAGE_MAP(), ON_BN_CLICKED(), and ON_LBN_SELCHANGE().

## Typedef Documentation

typedef short INT16

| Definition at line 337 of file jpeglib.h.

typedef struct jpeg_common_struct* j_common_ptr

| Definition at line 785 of file jpeglib.h.

typedef struct jpeg_compress_struct* j_compress_ptr

| Definition at line 786 of file jpeglib.h.

typedef struct jpeg_decompress_struct* j_decompress_ptr

| Definition at line 787 of file jpeglib.h.

typedef JCOEF JBLOCK[DCTSIZE2]

| Definition at line 594 of file jpeglib.h.

typedef JBLOCKROW* JBLOCKARRAY

| Definition at line 596 of file jpeglib.h.

typedef JBLOCKARRAY* JBLOCKIMAGE

| Definition at line 597 of file jpeglib.h.

typedef JBLOCK FAR* JBLOCKROW

| Definition at line 595 of file jpeglib.h.

typedef short JCOEF

| Definition at line 281 of file jpeglib.h.

typedef JCOEF FAR* JCOEFPTR

| Definition at line 599 of file jpeglib.h.

typedef unsigned int JDIMENSION

| Definition at line 353 of file jpeglib.h.

typedef unsigned char JOCTET

| Definition at line 292 of file jpeglib.h.

typedef struct jpeg_marker_struct FAR* jpeg_saved_marker_ptr

| Definition at line 717 of file jpeglib.h.

typedef struct jpeg_source_mgr jpeg_source_mgr

typedef JSAMPROW* JSAMPARRAY

| Definition at line 591 of file jpeglib.h.

typedef JSAMPARRAY* JSAMPIMAGE

| Definition at line 592 of file jpeglib.h.

typedef unsigned char JSAMPLE

| Definition at line 241 of file jpeglib.h.

typedef JSAMPLE FAR* JSAMPROW

| Definition at line 590 of file jpeglib.h.

typedef struct jvirt_barray_control* jvirt_barray_ptr

| Definition at line 1284 of file jpeglib.h.

typedef struct jvirt_sarray_control* jvirt_sarray_ptr

| Definition at line 1283 of file jpeglib.h.

typedef unsigned short UINT16

| Definition at line 329 of file jpeglib.h.

typedef unsigned char UINT8

| Definition at line 317 of file jpeglib.h.

## Enumeration Type Documentation

enum J_COLOR_SPACE

  | Enumeration values:
  JCS_UNKNOWN |
  JCS_GRAYSCALE |
  JCS_RGB |
  JCS_YCbCr |
  JCS_CMYK |
  JCS_YCCK |
Definition at line 730 of file jpeglib.h.
    00730              {
    00731         JCS_UNKNOWN,            /* error/unspecified */
    00732         JCS_GRAYSCALE,          /* monochrome */
    00733         JCS_RGB,                /* red/green/blue */
    00734         JCS_YCbCr,              /* Y/Cb/Cr (also known as YUV) */
    00735         JCS_CMYK,               /* C/M/Y/K */
    00736         JCS_YCCK                /* Y/Cb/Cr/K */
    00737 } J_COLOR_SPACE;

enum J_DCT_METHOD

  | Enumeration values:
  JDCT_ISLOW |
  JDCT_IFAST |
  JDCT_FLOAT |
Definition at line 741 of file jpeglib.h.
    00741              {
    00742         JDCT_ISLOW,             /* slow but accurate integer algorithm */
    00743         JDCT_IFAST,             /* faster, less accurate integer method */
    00744         JDCT_FLOAT              /* floating-point: accurate, fast on fast HW */
    00745 } J_DCT_METHOD;

enum J_DITHER_MODE

  | Enumeration values:
  JDITHER_NONE |
  JDITHER_ORDERED |
  JDITHER_FS |
Definition at line 756 of file jpeglib.h.
    00756              {
    00757         JDITHER_NONE,           /* no dithering */
    00758         JDITHER_ORDERED,        /* simple ordered dither */
    00759         JDITHER_FS              /* Floyd-Steinberg error diffusion dither */
    00760 } J_DITHER_MODE;

## Function Documentation

EXTERN | ( | jvirt_barray_ptr * |  | ) |

EXTERN | ( | boolean |  | ) |

EXTERN | ( | JDIMENSION |  | ) |

EXTERN | ( | JHUFF_TBL * |  | ) |

EXTERN | ( | JQUANT_TBL * |  | ) |

EXTERN | ( | int |  | ) |

EXTERN | ( | void |  | ) |

EXTERN | ( | struct jpeg_error_mgr * |  | ) |

typedef JMETHOD | ( | boolean | ,
|  | jpeg_marker_parser_method | ,
|  | (j_decompress_ptr cinfo) |
| ) |

## Variable Documentation

int const unsigned int* basic_table

| Definition at line 1455 of file jpeglib.h.

jvirt_barray_ptr* coef_arrays

| Definition at line 1548 of file jpeglib.h.

J_COLOR_SPACE colorspace

| Definition at line 1448 of file jpeglib.h.

JSAMPIMAGE data

| Definition at line 1514 of file jpeglib.h. Referenced by ExNihilo::ExtractFloatValueFromFile(), ExNihilo::ExtractIntValueFromFile(), ExCFileReader::getContent(), ExCMap::LoadMap(), ExManagerSound::LoadSound(), ExCModelASC::ProcessLine(), and ExCObject3D::ShowInfo().

int unsigned int datalen

| Definition at line 1485 of file jpeglib.h.

int const JOCTET* dataptr

| Definition at line 1481 of file jpeglib.h.

int desired

| Definition at line 1571 of file jpeglib.h.

j_compress_ptr dstinfo

| Definition at line 1550 of file jpeglib.h.

int const unsigned int int boolean force_baseline

| Definition at line 1455 of file jpeglib.h.

FILE* infile

| Definition at line 1442 of file jpeglib.h.

int unsigned int length_limit

| Definition at line 1537 of file jpeglib.h.

int marker

| Definition at line 1485 of file jpeglib.h.

int marker_code

| Definition at line 1542 of file jpeglib.h.

JSAMPIMAGE JDIMENSION max_lines

| Definition at line 1514 of file jpeglib.h.

JSAMPIMAGE JDIMENSION num_lines

| Definition at line 1476 of file jpeglib.h.

FILE* outfile

| Definition at line 1441 of file jpeglib.h.

int quality

| Definition at line 1450 of file jpeglib.h.

boolean require_image

| Definition at line 1494 of file jpeglib.h.

int jpeg_marker_parser_method routine

| Definition at line 1542 of file jpeglib.h.

int const unsigned int int scale_factor

| Definition at line 1455 of file jpeglib.h.

int scan_number

| Definition at line 1520 of file jpeglib.h.

JSAMPARRAY scanlines

| Definition at line 1508 of file jpeglib.h.

int size_t structsize

| Definition at line 1434 of file jpeglib.h.

boolean suppress

| Definition at line 1462 of file jpeglib.h.

int val

| Definition at line 1487 of file jpeglib.h. Referenced by ExCVertex::DecX(), ExCVertex::DecY(), ExCVertex::DecZ(), ExCVertex::IncX(), ExCVertex::IncY(), ExCVertex::IncZ(), ExCVertex::SetA(), ExCVertex::SetB(), ExCVertex::SetG(), ExCVertex::SetR(), ExCVertex::SetU(), ExCVertex::SetV(), ExCVertex::SetW(), ExCVertex::SetX(), ExCVec3D::SetX(), ExCVec2D::SetX(), ExCVertex::SetY(), ExCVec3D::SetY(), ExCVec2D::SetY(), ExCVertex::SetZ(), and ExCVec3D::SetZ().

int version

| Definition at line 1434 of file jpeglib.h. Referenced by ExCModel3DS::Load().

int which_tbl

| Definition at line 1455 of file jpeglib.h.

boolean write_all_tables

| Definition at line 1468 of file jpeglib.h.