38 #include "sensor_msgs/Image.h" 45 const std::string& encoding_arg,
51 image.encoding = encoding_arg;
52 image.height = rows_arg;
53 image.width = cols_arg;
54 image.step = step_arg;
55 size_t st0 = (step_arg * rows_arg);
56 image.data.resize(st0);
57 memcpy(&image.data[0], data_arg, st0);
59 image.is_bigendian = 0;
static bool fillImage(Image &image, const std::string &encoding_arg, uint32_t rows_arg, uint32_t cols_arg, uint32_t step_arg, const void *data_arg)
static void clearImage(Image &image)
Tools for manipulating sensor_msgs.