jpeg_writer.cpp File Reference

Implementation of the claw::graphic::jpeg::writer class. More...

#include <claw/jpeg.hpp>
#include <claw/jpeg_error_manager.hpp>
#include <claw/exception.hpp>
#include <claw/assert.hpp>

Go to the source code of this file.

Functions

 claw__graphic__jpeg__destination_manager__init_destination (j_compress_ptr cinfo)
 Initialize the output stream.
 claw__graphic__jpeg__destination_manager__empty_output_buffer (j_compress_ptr cinfo)
 Write the content of the buffer in the file.
 claw__graphic__jpeg__destination_manager__term_destination (j_compress_ptr cinfo)
 Write the last pending bytes in the file.

Detailed Description

Implementation of the claw::graphic::jpeg::writer class.

Author:
Julien Jorge

Definition in file jpeg_writer.cpp.


Function Documentation

claw__graphic__jpeg__destination_manager__empty_output_buffer ( j_compress_ptr  cinfo  ) 

Write the content of the buffer in the file.

Parameters:
cinfo Informations about the compression.

Definition at line 54 of file jpeg_writer.cpp.

References CLAW_PRECOND.

Referenced by claw::graphic::jpeg::writer::create_compress_info().

00055 {
00056   claw::graphic::jpeg::writer::destination_manager* self =
00057     (claw::graphic::jpeg::writer::destination_manager*)cinfo->client_data;
00058 
00059   CLAW_PRECOND( &self->pub == cinfo->dest );
00060 
00061   self->flush();
00062 
00063   return TRUE;
00064 } // claw__graphic__jpeg__destination_manager__empty_output_buffer()

claw__graphic__jpeg__destination_manager__init_destination ( j_compress_ptr  cinfo  ) 

Initialize the output stream.

Parameters:
cinfo Informations about the compression.

Definition at line 42 of file jpeg_writer.cpp.

Referenced by claw::graphic::jpeg::writer::create_compress_info().

00043 {
00044   // nothing to do
00045 } // claw__graphic__jpeg__destination_manager__init_destination()

claw__graphic__jpeg__destination_manager__term_destination ( j_compress_ptr  cinfo  ) 

Write the last pending bytes in the file.

Parameters:
cinfo Informations about the compression.

Definition at line 72 of file jpeg_writer.cpp.

References CLAW_PRECOND.

Referenced by claw::graphic::jpeg::writer::create_compress_info().

00073 {
00074   claw::graphic::jpeg::writer::destination_manager* self =
00075     (claw::graphic::jpeg::writer::destination_manager*)cinfo->client_data;
00076 
00077   CLAW_PRECOND( &self->pub == cinfo->dest );
00078 
00079   self->term();
00080 } // claw__graphic__jpeg__destination_manager__term_destination()


Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1