#include <JPEGImage.h>
Inheritance diagram for JPEGImage:
Public Member Functions | |
JPEGImage () | |
JPEGImage (const Image &src) | |
JPEGImage & | operator= (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 | |
Out & | operator<< (Out &stream, const JPEGImage &image) |
In & | operator>> (In &stream, JPEGImage &image) |
Classes | |
class | DestDescriptor |
Definition at line 41 of file JPEGImage.h.
JPEGImage::JPEGImage | ( | ) | [inline] |
JPEGImage::JPEGImage | ( | const Image & | src | ) |
Constructs a JPEG image from an image.
src | The image used as template. |
Definition at line 10 of file JPEGImage.cpp.
References Image::image.
int JPEGImage::onDestEmpty | ( | j_compress_ptr | ) | [static, private] |
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] |
void JPEGImage::onSrcIgnore | ( | j_decompress_ptr | ) | [static, private] |
void JPEGImage::onSrcSkip | ( | j_decompress_ptr | cInfo, | |
long | numBytes | |||
) | [static, private] |
Assignment operator.
src | The image used as template. |
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.
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().
Streaming operator that writes a JPEGImage to a stream.
stream | The stream to write on. | |
image | The JPEGImage object. |
Definition at line 143 of file JPEGImage.cpp.
Streaming operator that reads a JPEGImage from a stream.
stream | The stream to read from. | |
image | The JPEGImage object. |
Definition at line 151 of file JPEGImage.cpp.
unsigned JPEGImage::size [private] |
The size of the JPEG image.
Definition at line 54 of file JPEGImage.h.
Referenced by JPEGImage(), and toImage().