26 #include <ignition/math/Color.hh> 42 "UNKNOWN_PIXEL_FORMAT",
70 UNKNOWN_PIXEL_FORMAT = 0,
97 const std::string &_format);
101 public:
explicit Image(
const std::string &_filename=
"");
104 public:
virtual ~
Image();
109 public:
int Load(
const std::string &_filename);
113 public:
void SavePNG(
const std::string &_filename);
120 public:
void SetFromData(
const unsigned char *_data,
122 unsigned int _height,
128 public:
void GetData(
unsigned char **_data,
129 unsigned int &_count)
const;
135 public:
void GetRGBData(
unsigned char **_data,
136 unsigned int &_count)
const;
140 public:
unsigned int GetWidth()
const;
144 public:
unsigned int GetHeight()
const;
148 public:
unsigned int GetBPP()
const;
152 public:
int GetPitch()
const;
156 public: std::string GetFilename()
const;
166 public: ignition::math::Color Pixel(
const unsigned int _x,
167 const unsigned int _y)
const;
171 public: ignition::math::Color AvgColor();
175 public: ignition::math::Color MaxColor()
const;
180 public:
void Rescale(
int _width,
int _height);
184 public:
bool Valid()
const;
187 private:
void GetDataImpl(
unsigned char **_data,
unsigned int &_count,
188 FIBITMAP *_img)
const;
192 private:
static int count;
195 private: FIBITMAP *bitmap;
198 private: std::string fullName;
Forward declarations for the common classes.
Definition: Animation.hh:26
PixelFormat
Pixel formats enumeration.
Definition: Image.hh:68
static std::string PixelFormatNames[]
String names for the pixel formats.
Definition: Image.hh:40
Encapsulates an image.
Definition: Image.hh:65
common
Definition: FuelModelDatabase.hh:37