30 #ifndef __CLAW_XBM_HPP__
31 #define __CLAW_XBM_HPP__
61 void load( std::istream& f );
64 void read_from_file( std::istream& f );
66 void read_size( std::istream& f );
67 unsigned int read_dim(
const std::string& line )
const;
68 unsigned int read_bits_per_entry( std::istream& f )
const;
69 void read_name( std::istream& f );
70 void read_pixels( std::istream& f,
unsigned int bpe )
const;
73 ( std::istream& f, std::string& line,
char endchar )
const;
75 ( std::istream& f, std::string& line,
char endchar )
const;
125 void save_bits( std::ostream& f )
const;
129 const image& m_image;
134 xbm(
unsigned int w,
unsigned int h );
136 xbm( std::istream& f );
139 void save( std::ostream& os )
const;
141 void set_name(
const std::string& name );
155 #endif // __CLAW_XBM_HPP__
void load(std::istream &f)
Load an image from a xbm file.
A class for xbm pictures.
Parameters of the writing algorithm.
options()
Default constructor.
void set_name(const std::string &name)
Set the name of the image.
reader(image &img)
Constructor.
void save(std::ostream &os) const
Save the image.
std::string name
The name of the image structure in the file.
This class read data from a xbm file and store it in an image.
xbm(unsigned int w, unsigned int h)
Constructor. Creates an empty image.
void set_hot(const claw::math::coordinate_2d< int > &hot)
Set the hot spot of the image.
void save(std::ostream &f, const options &opt=options()) const
Save the image in a XBM file.
const claw::math::coordinate_2d< int > * hot
The position of the hot spot in the image.
This class write an image in a xbm file.
A class to deal with images.
This is the main namespace.
writer(const image &img)
Constructor.
A class to deal with images.