libsswf: libsswf_tag_image.c++ File Reference

# libsswf_tag_image.c++ File Reference

The implementation of the sswf::TagImage class. More...

## Classes
struct | SSWF_JPG_DESTINATION
| Structure definition for the destination buffer of a JPG image. More...
struct | SSWF_JPG_ERROR
| Structure used to read a JPG image. More...
struct | SSWF_JPG_SOURCE
| Structure definition for the source buffer of a JPG image. More...
## Defines
#define | jdst ((sswf_jpg_destination *) cinfo->dest)
#define | jsrc ((sswf_jpg_source *) cinfo->src)
#define | SSWF_JPG_BUFSIZE 4096
## Typedefs
typedef struct SSWF_JPG_DESTINATION | sswf_jpg_destination
typedef struct SSWF_JPG_ERROR | sswf_jpg_error
typedef struct SSWF_JPG_SOURCE | sswf_jpg_source
## Enumerations
enum | targa_header_t { TGA_OFFSET_IDENTIFIER_LENGTH = 0, TGA_OFFSET_COLORMAP_TYPE, TGA_OFFSET_IMAGE_TYPE, TGA_OFFSET_COLORMAP_INDEX_LO, TGA_OFFSET_COLORMAP_INDEX_HI, TGA_OFFSET_COLORMAP_LENGTH_LO, TGA_OFFSET_COLORMAP_LENGTH_HI, TGA_OFFSET_COLORMAP_SIZE, TGA_OFFSET_ORIGIN_X_LO, TGA_OFFSET_ORIGIN_X_HI, TGA_OFFSET_ORIGIN_Y_LO, TGA_OFFSET_ORIGIN_Y_HI, TGA_OFFSET_WIDTH_LO, TGA_OFFSET_WIDTH_HI, TGA_OFFSET_HEIGHT_LO, TGA_OFFSET_HEIGHT_HI, TGA_OFFSET_BITS_PER_PIXEL, TGA_OFFSET_FLAGS, TGA_HEADER_SIZE }
| The offsets to read/write in the header of a targa image file. More...
## Functions
static boolean | sswfEmptyOutputBuffer (j_compress_ptr cinfo)
static boolean | sswfFillInputBuffer (j_decompress_ptr cinfo)
static void | sswfInitDestination (j_compress_ptr cinfo)
static void | sswfInitSource (j_decompress_ptr cinfo)
static void | sswfJPEGError (j_common_ptr cinfo)
static boolean | sswfResyncToRestart (j_decompress_ptr cinfo, int desired)
static void | sswfSkipInputData (j_decompress_ptr cinfo, long num_bytes)
static void | sswfTermDestination (j_compress_ptr cinfo)
static void | sswfTermSource (j_decompress_ptr cinfo)
static void | sswfWriteData (sswf_jpg_destination *dst, const unsigned char *buffer, unsigned long size)

## Detailed Description

This file declares the body of the functions which are not inline. It is part of the SSWF library.

## Define Documentation

#define jdst ((sswf_jpg_destination *) cinfo->dest)

Referenced by sswfEmptyOutputBuffer(), sswfInitDestination(), and sswfTermDestination().

#define jsrc ((sswf_jpg_source *) cinfo->src)

Referenced by sswfFillInputBuffer(), and sswfSkipInputData().

#define SSWF_JPG_BUFSIZE 4096

Referenced by sswfEmptyOutputBuffer(), sswfFillInputBuffer(), sswfInitDestination(), and sswfTermDestination().

## Typedef Documentation

typedef struct SSWF_JPG_DESTINATION sswf_jpg_destination

typedef struct SSWF_JPG_ERROR sswf_jpg_error

typedef struct SSWF_JPG_SOURCE sswf_jpg_source

## Enumeration Type Documentation

enum targa_header_t

Enumerator:

  TGA_OFFSET_IDENTIFIER_LENGTH |
  TGA_OFFSET_COLORMAP_TYPE |
  TGA_OFFSET_IMAGE_TYPE |
  TGA_OFFSET_COLORMAP_INDEX_LO |
  TGA_OFFSET_COLORMAP_INDEX_HI |
  TGA_OFFSET_COLORMAP_LENGTH_LO |
  TGA_OFFSET_COLORMAP_LENGTH_HI |
  TGA_OFFSET_COLORMAP_SIZE |
  TGA_OFFSET_ORIGIN_X_LO |
  TGA_OFFSET_ORIGIN_X_HI |
  TGA_OFFSET_ORIGIN_Y_LO |
  TGA_OFFSET_ORIGIN_Y_HI |
  TGA_OFFSET_WIDTH_LO |
  TGA_OFFSET_WIDTH_HI |
  TGA_OFFSET_HEIGHT_LO |
  TGA_OFFSET_HEIGHT_HI |
  TGA_OFFSET_BITS_PER_PIXEL |
  TGA_OFFSET_FLAGS |
  TGA_HEADER_SIZE |

## Function Documentation

static boolean sswfEmptyOutputBuffer | ( | j_compress_ptr | cinfo | ) | `[static]`

References jdst, SSWF_JPG_BUFSIZE, and sswfWriteData().

Referenced by sswf::TagImage::SaveJPEG().

static boolean sswfFillInputBuffer | ( | j_decompress_ptr | cinfo | ) | `[static]`

References jsrc, and SSWF_JPG_BUFSIZE.

Referenced by sswf::TagImage::LoadJPEG(), sswfInitSource(), and sswfSkipInputData().

static void sswfInitDestination | ( | j_compress_ptr | cinfo | ) | `[static]`

References jdst, and SSWF_JPG_BUFSIZE.

Referenced by sswf::TagImage::SaveJPEG().

static void sswfInitSource | ( | j_decompress_ptr | cinfo | ) | `[static]`

References sswfFillInputBuffer().

Referenced by sswf::TagImage::LoadJPEG().

static void sswfJPEGError | ( | j_common_ptr | cinfo | ) | `[static]`

References SSWF_JPG_ERROR::setjmp_buffer.

Referenced by sswf::TagImage::LoadJPEG(), and sswf::TagImage::SaveJPEG().

static boolean sswfResyncToRestart | ( | j_decompress_ptr | cinfo,
|  | int | desired |
| ) |  |  | `[static]`

Referenced by sswf::TagImage::LoadJPEG().

static void sswfSkipInputData | ( | j_decompress_ptr | cinfo,
|  | long | num_bytes |
| ) |  |  | `[static]`

References jsrc, and sswfFillInputBuffer().

Referenced by sswf::TagImage::LoadJPEG().

static void sswfTermDestination | ( | j_compress_ptr | cinfo | ) | `[static]`

References jdst, SSWF_JPG_BUFSIZE, and sswfWriteData().

Referenced by sswf::TagImage::SaveJPEG().

static void sswfTermSource | ( | j_decompress_ptr | cinfo | ) | `[static]`

Referenced by sswf::TagImage::LoadJPEG().

static void sswfWriteData | ( | sswf_jpg_destination * | dst,
|  | const unsigned char * | buffer,
|  | unsigned long | size |
| ) |  |  | `[static]`

References sswf::assert(), SSWF_JPG_DESTINATION::current, SSWF_JPG_DESTINATION::encoding, SSWF_JPG_DESTINATION::image, SSWF_JPG_DESTINATION::last_code, SSWF_JPG_DESTINATION::offset, sswf::Data::PutByte(), SSWF_JPG_DESTINATION::size, SSWF_JPG_DESTINATION::state, and sswf::Data::Write().

Referenced by sswfEmptyOutputBuffer(), and sswfTermDestination().