31#ifndef PNGPP_GENERATOR_HPP_INCLUDED 
   32#define PNGPP_GENERATOR_HPP_INCLUDED 
  112    template< 
typename pixel,
 
  114              class info_holder = def_image_info_holder,
 
  115              bool interlacing_supported = 
false >
 
  128        template< 
typename ostream >
 
  135#if __BYTE_ORDER == __LITTLE_ENDIAN 
  138#ifdef PNG_WRITE_SWAP_SUPPORTED 
  141                throw error(
"Cannot write 16-bit image: recompile with PNG_WRITE_SWAP_SUPPORTED.");
 
  149#ifdef PNG_WRITE_INTERLACING_SUPPORTED 
  150                if (interlacing_supported)
 
  156                    throw std::logic_error(
"Cannot write interlaced image: generator does not support it.");
 
  159                throw error(
"Cannot write interlaced image: interlace handling disabled.");
 
  166            pixgen* pixel_gen = 
static_cast< pixgen* 
>(
this);
 
  167            for (
size_t pass = 0; pass < pass_count; ++pass)
 
  169                pixel_gen->reset(pass);
 
  173                    wr.
write_row(pixel_gen->get_next_row(pos));
 
 
  197            : 
base(width, height)
 
 
 
Exception class to represent runtime errors related to png++ operation.
Definition error.hpp:59
Pixel generator class template.
Definition generator.hpp:118
generator(size_t width, size_t height)
Constructs a generator object prepared to generate an image of specified width and height.
Definition generator.hpp:196
generator(image_info &info)
Constructs a generator object using passed image_info object to store image information.
Definition generator.hpp:187
void write(ostream &stream)
Writes an image to the stream.
Definition generator.hpp:129
streaming_base< pixel, info_holder > base
Definition generator.hpp:181
Holds information about PNG image.
Definition image_info.hpp:48
uint_32 get_height() const
Definition image_info.hpp:77
Holds information about PNG image. Adapter class for IO image operations.
Definition info.hpp:48
int set_interlace_handling() const
Definition io_base.hpp:376
void set_image_info(image_info const &info)
Definition io_base.hpp:102
void set_swap() const
Definition io_base.hpp:312
A base class template for consumer and generator classes. Provides default reset() method implementat...
Definition streaming_base.hpp:91
image_info const & get_info() const
Definition streaming_base.hpp:107
PNG writer class template. This is the low-level writing interface–use image class or generator class...
Definition writer.hpp:68
void write_info() const
Write info about PNG image.
Definition writer.hpp:104
void write_end_info() const
Reads ending info about PNG image.
Definition writer.hpp:128
void write_row(byte *bytes)
Writes a row of image data at a time.
Definition writer.hpp:116
@ interlace_none
Definition types.hpp:81
png_uint_32 uint_32
Definition types.hpp:41
Pixel traits class template.
Definition pixel_traits.hpp:48