libpng++  v0.2.5-1
C++ library for PNG images
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
png::io_base Class Reference

Base class for PNG reader/writer classes. More...

#include <io_base.hpp>

Inheritance diagram for png::io_base:
Collaboration diagram for png::io_base:

Public Member Functions

 io_base (png_struct *png)
 
 ~io_base ()
 
size_t get_bit_depth () const
 
color_type get_color_type () const
 
compression_type get_compression_type () const
 
end_infoget_end_info ()
 
end_info const & get_end_info () const
 
filter_type get_filter_type () const
 
size_t get_height () const
 
image_info const & get_image_info () const
 
infoget_info ()
 
info const & get_info () const
 
interlace_type get_interlace_type () const
 
png_struct * get_png_struct () const
 
size_t get_width () const
 
bool has_chunk (chunk id)
 
void set_bit_depth (size_t bit_depth)
 
void set_color_type (color_type color_space)
 
void set_compression_type (compression_type compression)
 
void set_filter_type (filter_type filter)
 
void set_height (size_t height)
 
void set_image_info (image_info const &info)
 
void set_interlace_type (interlace_type interlace)
 
void set_rgb_to_gray (rgb_to_gray_error_action error_action=rgb_to_gray_silent, fixed_point red_weight=-1, fixed_point green_weight=-1) const
 
void set_width (size_t width)
 

Protected Member Functions

void * get_io_ptr () const
 
bool is_error () const
 
void raise_error ()
 
void reset_error ()
 
void set_error (char const *message)
 

Static Protected Member Functions

static void raise_error (png_struct *png, char const *message)
 

Protected Attributes

end_info m_end_info
 
std::string m_error
 
info m_info
 
png_struct * m_png
 

Private Member Functions

 io_base (io_base const &)
 
io_baseoperator= (io_base const &)
 

Detailed Description

Base class for PNG reader/writer classes.

See Also
reader, writer

Constructor & Destructor Documentation

png::io_base::io_base ( io_base const &  )
private
png::io_base::io_base ( png_struct *  png)
inlineexplicit
png::io_base::~io_base ( )
inline

References png::info_base::get_png_info(), m_end_info, m_info, and m_png.

Here is the call graph for this function:

Member Function Documentation

compression_type png::io_base::get_compression_type ( ) const
inline

References png::image_info::get_compression_type(), and m_info.

Here is the call graph for this function:

end_info& png::io_base::get_end_info ( )
inline

References m_end_info.

end_info const& png::io_base::get_end_info ( ) const
inline

References m_end_info.

filter_type png::io_base::get_filter_type ( ) const
inline

References png::image_info::get_filter_type(), and m_info.

Here is the call graph for this function:

size_t png::io_base::get_height ( ) const
inline

References png::image_info::get_height(), and m_info.

Here is the call graph for this function:

image_info const& png::io_base::get_image_info ( ) const
inline

References m_info.

Referenced by png::consumer< pixel, pixel_consumer, image_info_ref_holder, true >::read().

Here is the caller graph for this function:

info& png::io_base::get_info ( )
inline

References m_info.

Referenced by png::detail::convert_color_space_impl< rgb_pixel >::handle_palette().

Here is the caller graph for this function:

info const& png::io_base::get_info ( ) const
inline

References m_info.

interlace_type png::io_base::get_interlace_type ( ) const
inline

References png::image_info::get_interlace_type(), and m_info.

Referenced by png::consumer< pixel, pixel_consumer, image_info_ref_holder, true >::read().

Here is the call graph for this function:

Here is the caller graph for this function:

void* png::io_base::get_io_ptr ( ) const
inlineprotected

References m_png.

png_struct* png::io_base::get_png_struct ( ) const
inline

References m_png.

size_t png::io_base::get_width ( ) const
inline

References png::image_info::get_width(), and m_info.

Here is the call graph for this function:

bool png::io_base::has_chunk ( chunk  id)
inline

References png::info_base::get_png_info(), m_info, and m_png.

Referenced by png::detail::convert_color_space_impl< rgb_pixel >::handle_alpha().

Here is the call graph for this function:

Here is the caller graph for this function:

bool png::io_base::is_error ( ) const
inlineprotected

References m_error.

Referenced by png::writer< ostream >::flush_data(), png::reader< istream >::read_data(), and png::writer< ostream >::write_data().

Here is the caller graph for this function:

io_base& png::io_base::operator= ( io_base const &  )
private
void png::io_base::raise_error ( )
inlineprotected

References m_png.

Referenced by png::writer< ostream >::flush_data(), raise_error(), png::reader< istream >::read_data(), and png::writer< ostream >::write_data().

Here is the caller graph for this function:

static void png::io_base::raise_error ( png_struct *  png,
char const *  message 
)
inlinestaticprotected

References raise_error(), and set_error().

Here is the call graph for this function:

void png::io_base::reset_error ( )
inlineprotected

References m_error.

Referenced by png::writer< ostream >::flush_data(), png::reader< istream >::read_data(), and png::writer< ostream >::write_data().

Here is the caller graph for this function:

void png::io_base::set_bit_depth ( size_t  bit_depth)
inline

References m_info, and png::image_info::set_bit_depth().

Referenced by png::detail::convert_color_space_impl< rgb_pixel >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void png::io_base::set_color_type ( color_type  color_space)
inline

References m_info, and png::image_info::set_color_type().

Referenced by png::detail::convert_color_space_impl< rgb_pixel >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void png::io_base::set_compression_type ( compression_type  compression)
inline

References m_info, and png::image_info::set_compression_type().

Here is the call graph for this function:

void png::io_base::set_error ( char const *  message)
inlineprotected
void png::io_base::set_filter_type ( filter_type  filter)
inline

References m_info, and png::image_info::set_filter_type().

Here is the call graph for this function:

void png::io_base::set_height ( size_t  height)
inline

References m_info, and png::image_info::set_height().

Here is the call graph for this function:

void png::io_base::set_image_info ( image_info const &  info)
inline

References m_info.

Referenced by png::generator< pixel, pixel_generator, image_info_ref_holder, true >::write().

Here is the caller graph for this function:

void png::io_base::set_interlace_type ( interlace_type  interlace)
inline

References m_info, and png::image_info::set_interlace_type().

Here is the call graph for this function:

void png::io_base::set_rgb_to_gray ( rgb_to_gray_error_action  error_action = rgb_to_gray_silent,
fixed_point  red_weight = -1,
fixed_point  green_weight = -1 
) const
inline

References m_png, and TRACE_IO_TRANSFORM.

Referenced by png::detail::convert_color_space_impl< rgb_pixel >::handle_rgb().

Here is the caller graph for this function:

void png::io_base::set_width ( size_t  width)
inline

References m_info, and png::image_info::set_width().

Here is the call graph for this function:

Member Data Documentation


The documentation for this class was generated from the following file: