55 for (ssize_t col = 0; col <
nb_cols_; ++col)
58 for (ssize_t row = 0; row <
nb_rows_; ++row)
60 const Magick::PixelPacket* tmp_pixel = pixel_cache + row * nb_cols_ + col;
61 if (tmp_pixel->red != 0xFFFF && tmp_pixel->green != 0xFFFF
62 && tmp_pixel->blue != 0xFFFF)
65 steps.push_back(1.0 - static_cast<double>(row) / static_cast<double>(nb_rows_));
72 steps.push_back(-1.0);
ssize_t nb_cols_
The number of columns in the image.
Reads a png file and creates a movement from it.
virtual ~MovementFromImage()
void generate_movement_()
ssize_t nb_rows_
The number of rows in the image.
boost::shared_ptr< Magick::Image > image_
The image from which the movement is generated.
MovementFromImage(std::string image_path)
std::vector< double > steps