28 #include <FreeImage.h> 
   45       "UNKNOWN_PIXEL_FORMAT",
 
   73                 UNKNOWN_PIXEL_FORMAT = 0,
 
  100                   const std::string &_format);
 
  104       public: 
explicit Image(
const std::string &_filename=
"");
 
  107       public: 
virtual ~
Image();
 
  112       public: 
int Load(
const std::string &_filename);
 
  116       public: 
void SavePNG(
const std::string &_filename);
 
  123       public: 
void SetFromData(
const unsigned char *_data,
 
  125                                unsigned int _height,
 
  131       public: 
void GetData(
unsigned char **_data,
 
  132                            unsigned int &_count) 
const;
 
  138       public: 
void GetRGBData(
unsigned char **_data,
 
  139                               unsigned int &_count) 
const;
 
  143       public: 
unsigned int GetWidth() 
const;
 
  147       public: 
unsigned int GetHeight() 
const;
 
  151       public: 
unsigned int GetBPP() 
const;
 
  155       public: 
int GetPitch() 
const;
 
  159       public: std::string GetFilename() 
const;
 
  163       public: PixelFormat GetPixelFormat() 
const;
 
  169       public: 
Color GetPixel(
unsigned int _x, 
unsigned int _y) 
const;
 
  173       public: 
Color GetAvgColor();
 
  177       public: 
Color GetMaxColor() 
const;
 
  182       public: 
void Rescale(
int _width, 
int _height);
 
  186       public: 
bool Valid() 
const;
 
  189       private: 
void GetDataImpl(
unsigned char **_data, 
unsigned int &_count,
 
  190           FIBITMAP *_img) 
const;
 
  194       private: 
static int count;
 
  197       private: FIBITMAP *bitmap;
 
  200       private: std::string fullName;
 
PixelFormat
Pixel formats enumeration. 
Definition: Image.hh:71
static std::string PixelFormatNames[]
String names for the pixel formats. 
Definition: Image.hh:43
Defines a color. 
Definition: Color.hh:39
Encapsulates an image. 
Definition: Image.hh:68
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported. 
Definition: system.hh:48