6 #ifndef CNOID_UTIL_IMAGE_H 7 #define CNOID_UTIL_IMAGE_H 25 bool empty()
const {
return pixels_.empty(); }
27 unsigned char*
pixels() {
return &pixels_.front(); }
28 const unsigned char*
pixels()
const {
return &pixels_.front(); }
30 int width()
const {
return width_; }
31 int height()
const {
return height_; }
35 void setSize(
int width,
int height,
int nComponents);
36 void setSize(
int width,
int height);
39 void applyVerticalFlip();
41 void load(
const std::string& filename);
42 void save(
const std::string& filename)
const;
45 std::vector<unsigned char> pixels_;
int height() const
Definition: Image.h:31
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
bool hasAlphaComponent() const
Definition: Image.h:33
unsigned char * pixels()
Definition: Image.h:27
bool empty() const
Definition: Image.h:25
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
int width() const
Definition: Image.h:30
const unsigned char * pixels() const
Definition: Image.h:28
int numComponents() const
Definition: Image.h:32