JPEGImage Class Reference

#include <JPEGImage.h>

Inheritance diagram for JPEGImage:

Image List of all members.

Public Member Functions

 JPEGImage ()
 JPEGImage (const Image &src)
JPEGImageoperator= (const Image &src)
void toImage (Image &dest) const

Static Private Member Functions

Handlers for JPEG-compression
static void onDestInit (j_compress_ptr cInfo)
static int onDestEmpty (j_compress_ptr)
static void onDestTerm (j_compress_ptr cInfo)
static void onSrcSkip (j_decompress_ptr cInfo, long numBytes)
static int onSrcEmpty (j_decompress_ptr)
static void onSrcIgnore (j_decompress_ptr)

Private Attributes

unsigned size

Friends

Outoperator<< (Out &stream, const JPEGImage &image)
Inoperator>> (In &stream, JPEGImage &image)

Classes

class  DestDescriptor

Detailed Description

Definition of a class for JPEG-compressed images.

Definition at line 41 of file JPEGImage.h.


Constructor & Destructor Documentation

JPEGImage::JPEGImage (  )  [inline]

Empty constructor.

Definition at line 71 of file JPEGImage.h.

References size.

JPEGImage::JPEGImage ( const Image src  ) 

Constructs a JPEG image from an image.

Parameters:
src The image used as template.

Definition at line 10 of file JPEGImage.cpp.

References Image::image.


Member Function Documentation

int JPEGImage::onDestEmpty ( j_compress_ptr   )  [static, private]

Definition at line 117 of file JPEGImage.cpp.

References ASSERT.

Referenced by operator=().

void JPEGImage::onDestInit ( j_compress_ptr  cInfo  )  [static, private]

Definition at line 110 of file JPEGImage.cpp.

References jpeg_compress_struct::dest, jpeg_destination_mgr::free_in_buffer, Image::image, and jpeg_destination_mgr::next_output_byte.

Referenced by operator=().

void JPEGImage::onDestTerm ( j_compress_ptr  cInfo  )  [static, private]

Definition at line 123 of file JPEGImage.cpp.

References jpeg_compress_struct::dest, Image::image, and jpeg_destination_mgr::next_output_byte.

Referenced by operator=().

int JPEGImage::onSrcEmpty ( j_decompress_ptr   )  [static, private]

Definition at line 133 of file JPEGImage.cpp.

References ASSERT.

Referenced by toImage().

void JPEGImage::onSrcIgnore ( j_decompress_ptr   )  [static, private]

Definition at line 139 of file JPEGImage.cpp.

Referenced by toImage().

void JPEGImage::onSrcSkip ( j_decompress_ptr  cInfo,
long  numBytes 
) [static, private]

Definition at line 129 of file JPEGImage.cpp.

Referenced by toImage().

JPEGImage & JPEGImage::operator= ( const Image src  ) 

Assignment operator.

Parameters:
src The image used as template.
Returns:
The resulting JPEG image.

Reimplemented from Image.

Definition at line 15 of file JPEGImage.cpp.

References Image::cameraInfo, jpeg_compress_struct::dct_method, jpeg_compress_struct::dest, Image::frameNumber, Image::image, jpeg_compress_struct::image_height, jpeg_compress_struct::image_width, jpeg_compress_struct::in_color_space, jpeg_compress_struct::input_components, JCS_GRAYSCALE, JDCT_FASTEST, jpeg_create_compress, jpeg_destroy_compress(), jpeg_finish_compress(), jpeg_set_defaults(), jpeg_set_quality(), jpeg_start_compress(), jpeg_std_error(), jpeg_write_scanlines(), JPOOL_PERMANENT, jpeg_compress_struct::next_scanline, onDestEmpty(), onDestInit(), onDestTerm(), CameraInfo::resolutionHeight, and CameraInfo::resolutionWidth.

void JPEGImage::toImage ( Image dest  )  const

Uncompress image.

Parameters:
dest Will receive the uncompressed image.

Definition at line 56 of file JPEGImage.cpp.

References jpeg_source_mgr::bytes_in_buffer, Image::cameraInfo, cameraResolutionHeight_ERS210, cameraResolutionWidth_ERS210, Image::frameNumber, Image::image, jpeg_create_decompress, jpeg_destroy_decompress(), jpeg_finish_decompress(), jpeg_read_header(), jpeg_read_scanlines(), jpeg_resync_to_restart(), jpeg_start_decompress(), jpeg_std_error(), JPOOL_PERMANENT, jpeg_source_mgr::next_input_byte, onSrcEmpty(), onSrcIgnore(), onSrcSkip(), CameraInfo::resolutionHeight, CameraInfo::resolutionWidth, size, jpeg_decompress_struct::src, and void().

Referenced by CRobotRemoteApp::handleMessage(), CMessageHandlerForQueueToGUI::handleMessage(), CMessageHandlerForQueueFromPhysicalRobots::handleMessage(), Cognition::handleMessage(), RobotConsole::handleMessage(), LogPlayer::saveAMV(), and LogPlayer::saveImages().


Friends And Related Function Documentation

Out& operator<< ( Out stream,
const JPEGImage image 
) [friend]

Streaming operator that writes a JPEGImage to a stream.

Parameters:
stream The stream to write on.
image The JPEGImage object.
Returns:
The stream.

Definition at line 143 of file JPEGImage.cpp.

In& operator>> ( In stream,
JPEGImage image 
) [friend]

Streaming operator that reads a JPEGImage from a stream.

Parameters:
stream The stream to read from.
image The JPEGImage object.
Returns:
The stream.

Definition at line 151 of file JPEGImage.cpp.


Member Data Documentation

unsigned JPEGImage::size [private]

The size of the JPEG image.

Definition at line 54 of file JPEGImage.h.

Referenced by JPEGImage(), and toImage().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:40:30 2006 for DT2005.panorama by  doxygen 1.4.7