55 m_stream << p.components.blue << p.components.green
56 << p.components.red << p.components.alpha;
86 (
const image& img, std::ostream& f,
bool rle )
100 header h( m_image.width(), m_image.height() );
105 h.image_type = true_color;
107 os.write( reinterpret_cast<char*>(&h),
sizeof(
header) );
110 save_rle_true_color(os);
115 os.write( reinterpret_cast<char*>(&f),
sizeof(
footer) );
123 void claw::graphic::targa::writer::save_true_color( std::ostream& os )
const
125 file_output_buffer<rgba_pixel_8> output_buffer(os);
128 output_buffer.order_pixel_bytes(*it);
136 void claw::graphic::targa::writer::save_rle_true_color( std::ostream& os )
const
138 rle32_encoder encoder;
139 rle32_encoder::output_buffer_type output_buffer(os);
141 for (
unsigned int y=0; y!=m_image.height(); ++y )
142 encoder.encode( m_image[y].begin(), m_image[y].end(), output_buffer );