Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PLJPEGEncoder Class Reference

JPEG file encoder. More...

#include <pljpegenc.h>

Inheritance diagram for PLJPEGEncoder:

Inheritance graph
[legend]
Collaboration diagram for PLJPEGEncoder:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLJPEGEncoder ()
 Creates an encoder.
 ~PLJPEGEncoder ()
 Destroys a encoder.
void SetQuality (int iQuality)
 Set the compression quality on a scale from 0 to 100.
void SetOptimizeCoding (bool bOptimizeCoding)
 Enable or disable the generation of optimal Huffmann coding tables.
void SetSmoothingFactor (int iSmoothingFactor)
 Set the smoothing factor (<=100). 0 turns it off.
void SetDensity (unsigned int uiX, unsigned int uiY)
 Set the resolution information (DPI) for the image.

Protected Member Functions

void DoEncode (PLBmp *pBmp, PLDataSink *pDataSink)
 Implements the actual encoding process.

Private Member Functions

void encodeRGB (PLBmp *pBmp, int iScanLines)

Private Attributes

jpeg_compress_struct * m_pcinfo
jpeg_error_mgr * m_pjerr
int iQuality_
bool bOptimizeCoding_
int iSmoothingFactor_
unsigned int uiDensityX_
unsigned int uiDensityY_

Detailed Description

JPEG file encoder.

Uses the independent JPEG group's library to do the actual conversion.

Definition at line 23 of file pljpegenc.h.


Constructor & Destructor Documentation

PLJPEGEncoder::PLJPEGEncoder  ) 
 

Creates an encoder.

Definition at line 52 of file pljpegenc.cpp.

PLJPEGEncoder::~PLJPEGEncoder  ) 
 

Destroys a encoder.

Definition at line 71 of file pljpegenc.cpp.


Member Function Documentation

void PLJPEGEncoder::DoEncode PLBmp pBmp,
PLDataSink pDataSink
[protected, virtual]
 

Implements the actual encoding process.

Uses variables local to the object to retrieve and store the data. Implemented in derived classes.

Implements PLPicEncoder.

Definition at line 79 of file pljpegenc.cpp.

References jpeg_mem_dest(), and PLASSERT.

Here is the call graph for this function:

void PLJPEGEncoder::encodeRGB PLBmp pBmp,
int  iScanLines
[private]
 

Definition at line 140 of file pljpegenc.cpp.

References PLPixel32::GetB(), PLPixel32::GetG(), PLPixel32::GetR(), and PLBYTE.

Here is the call graph for this function:

void PLJPEGEncoder::SetDensity unsigned int  uiX,
unsigned int  uiY
 

Set the resolution information (DPI) for the image.

Definition at line 205 of file pljpegenc.cpp.

References uiDensityX_, and uiDensityY_.

void PLJPEGEncoder::SetOptimizeCoding bool  bOptimizeCoding  ) 
 

Enable or disable the generation of optimal Huffmann coding tables.

Definition at line 195 of file pljpegenc.cpp.

References bOptimizeCoding_.

void PLJPEGEncoder::SetQuality int  iQuality  ) 
 

Set the compression quality on a scale from 0 to 100.

Definition at line 190 of file pljpegenc.cpp.

References iQuality_.

void PLJPEGEncoder::SetSmoothingFactor int  iSmoothingFactor  ) 
 

Set the smoothing factor (<=100). 0 turns it off.

Definition at line 200 of file pljpegenc.cpp.

References iSmoothingFactor_.


Member Data Documentation

bool PLJPEGEncoder::bOptimizeCoding_ [private]
 

Definition at line 64 of file pljpegenc.h.

Referenced by SetOptimizeCoding().

int PLJPEGEncoder::iQuality_ [private]
 

Definition at line 63 of file pljpegenc.h.

Referenced by SetQuality().

int PLJPEGEncoder::iSmoothingFactor_ [private]
 

Definition at line 65 of file pljpegenc.h.

Referenced by SetSmoothingFactor().

jpeg_compress_struct* PLJPEGEncoder::m_pcinfo [private]
 

Definition at line 60 of file pljpegenc.h.

jpeg_error_mgr* PLJPEGEncoder::m_pjerr [private]
 

Definition at line 61 of file pljpegenc.h.

unsigned int PLJPEGEncoder::uiDensityX_ [private]
 

Definition at line 66 of file pljpegenc.h.

Referenced by SetDensity().

unsigned int PLJPEGEncoder::uiDensityY_ [private]
 

Definition at line 67 of file pljpegenc.h.

Referenced by SetDensity().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:00 2004 for vuVolume by  doxygen 1.3.9.1