34 #include <visp3/core/vpImage.h>
42 int main(
int ,
const char ** )
44 #ifdef ENABLE_VISP_NAMESPACE
49 unsigned char bitmap[4];
56 std::cout <<
"I:\n" << I << std::endl;
60 unsigned char bitmap[4];
67 std::cout <<
"\nI:\n" << I << std::endl;
70 unsigned char bitmap[4];
79 std::cout <<
"\nI2:\n" << I2 << std::endl;
83 std::cout <<
"I2:\n" << I2 << std::endl;
87 unsigned char bitmap[12];
88 for (
unsigned char i = 0; i < 12; i++) {
93 std::cout <<
"\nI:\n" << I << std::endl;
95 std::cout <<
"I:\n" << I << std::endl;
98 unsigned char bitmap[12];
99 for (
unsigned char i = 0; i < 12; i++) {
103 std::cout <<
"\nI:\n" << I << std::endl;
104 I.
init(bitmap, 4, 3,
true);
105 std::cout <<
"I:\n" << I << std::endl;
108 unsigned char *bitmap =
new unsigned char[12];
115 unsigned char *bitmap =
new unsigned char[12];
123 bitmap =
new unsigned char[16];
124 I.
init(bitmap, 4, 4,
false);
129 unsigned char *bitmap =
new unsigned char[12];
132 I.
init(bitmap, 3, 4,
false);
137 bitmap =
new unsigned char[16];
138 I.
init(bitmap, 4, 4,
false);
143 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
145 unsigned char *bitmap =
new unsigned char[12];
148 std::cout <<
"std::move(vpImage) failed" << std::endl;
154 unsigned char *bitmap =
new unsigned char[12];
157 std::cout <<
"vpImage(td::move(vpImage)) failed" << std::endl;
164 catch (
const std::exception &e) {
165 std::cerr <<
"Exception: " << e.what() << std::endl;
169 std::cout <<
"Test succeed" << std::endl;
void destroy()
Destructor : Memory de-allocation.
void init(unsigned int height, unsigned int width)
Set the size of the image.
Type * bitmap
points toward the bitmap