#include <jpeg.hpp>
Definition at line 195 of file jpeg.hpp.
Public Member Functions | |
| destination_manager (std::ostream &os) | |
| Constructor. | |
| ~destination_manager () | |
| Destructor. | |
| void | flush () |
| Write the content of the buffer in the file. | |
| void | term () |
| Write the last pending bytes in the file. | |
Public Attributes | |
| struct jpeg_destination_mgr | pub |
| "public" fields, needed by the jpeg library. | |
Private Attributes | |
| std::ostream & | m_output |
| The stream in which we write the data. | |
| JOCTET * | m_buffer |
| Pointer on the begining of the buffer. | |
| const unsigned int | m_buffer_size |
| Number of bytes in the buffer. | |
| claw::graphic::jpeg::writer::destination_manager::destination_manager | ( | std::ostream & | os | ) |
Constructor.
| os | The stream we write in. |
Definition at line 91 of file jpeg_writer.cpp.
00092 : m_output(os), m_buffer_size(1024) 00093 { 00094 m_buffer = new JOCTET[m_buffer_size]; 00095 pub.next_output_byte = m_buffer; 00096 pub.free_in_buffer = m_buffer_size; 00097 } // jpeg::writer::destination_manager::destination_manager()
| claw::graphic::jpeg::writer::destination_manager::~destination_manager | ( | ) |
Destructor.
Definition at line 103 of file jpeg_writer.cpp.
References m_buffer.
00104 { 00105 delete[] m_buffer; 00106 } // jpeg::writer::destination_manager::~destination_manager()
| void claw::graphic::jpeg::writer::destination_manager::flush | ( | ) |
Write the content of the buffer in the file.
Definition at line 112 of file jpeg_writer.cpp.
References m_buffer, m_buffer_size, m_output, and pub.
00113 { 00114 m_output.write((char*)m_buffer, m_buffer_size); 00115 00116 pub.next_output_byte = m_buffer; 00117 pub.free_in_buffer = m_buffer_size; 00118 } // jpeg::writer::destination_manager::fill_output_buffer()
| void claw::graphic::jpeg::writer::destination_manager::term | ( | ) |
Write the last pending bytes in the file.
Definition at line 125 of file jpeg_writer.cpp.
References m_buffer, m_buffer_size, m_output, and pub.
00126 { 00127 m_output.write((char*)m_buffer, m_buffer_size - pub.free_in_buffer); 00128 } // jpeg::writer::destination_manager::term()
struct jpeg_destination_mgr claw::graphic::jpeg::writer::destination_manager::pub [read] |
std::ostream& claw::graphic::jpeg::writer::destination_manager::m_output [private] |
JOCTET* claw::graphic::jpeg::writer::destination_manager::m_buffer [private] |
Pointer on the begining of the buffer.
Definition at line 213 of file jpeg.hpp.
Referenced by flush(), term(), and ~destination_manager().
const unsigned int claw::graphic::jpeg::writer::destination_manager::m_buffer_size [private] |
1.5.5