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;
72 void read_line(std::istream& f, std::string& line,
char endchar)
const;
73 void remove_comments(std::istream& f, std::string& line,
123 void save_bits(std::ostream& f)
const;
127 const image& m_image;
132 xbm(
unsigned int w,
unsigned int h);
134 xbm(std::istream& f);
137 void save(std::ostream& os)
const;
139 void set_name(
const std::string& name);
image()
Constructor. Creates an image without datas.
reader(image &img)
Constructor.
void load(std::istream &f)
Load an image from a xbm file.
void save(std::ostream &f, const options &opt=options()) const
Save the image in a XBM file.
writer(const image &img)
Constructor.
void save(std::ostream &os) const
Save the 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 set_name(const std::string &name)
Set the name of the image.
Coordinates in a two dimensional space.
A class to deal with images.
Everything about image structures and processing.
This is the main namespace.
Parameters of the writing algorithm.
options()
Default constructor.
const claw::math::coordinate_2d< int > * hot
The position of the hot spot in the image.
std::string name
The name of the image structure in the file.