void skip_interlaced_rows(reader< istream >& rd, size_t pass_count) { typedef std::vector< pixel > row; typedef row_traits< row > row_traits_type; row dummy_row(this->get_info().get_width()); for (size_t pass = 1; pass < pass_count; ++pass) { rd.read_row(reinterpret_cast< byte* > (row_traits_type::get_data(dummy_row))); } }
void read_rows(reader< istream >& rd, size_t pass_count, pixcon* pixel_con) { for (size_t pass = 0; pass < pass_count; ++pass) { pixel_con->reset(pass); for (size_t pos = 0; pos < this->get_info().get_height(); ++pos) { rd.read_row(pixel_con->get_next_row(pos)); } } }