Fix get_pixel with image_view

This commit is contained in:
Blake Thompson 2015-05-11 18:19:24 -05:00
parent c7ddec8406
commit e44cdef805
2 changed files with 5 additions and 3 deletions

View file

@ -100,7 +100,7 @@ inline std::size_t image_view<T>::height() const
template <typename T> template <typename T>
inline typename image_view<T>::pixel_type const& image_view<T>::operator() (std::size_t i, std::size_t j) const inline typename image_view<T>::pixel_type const& image_view<T>::operator() (std::size_t i, std::size_t j) const
{ {
return data_(i,j); return data_(i + x_,j + y_);
} }
template <typename T> template <typename T>

View file

@ -78,5 +78,7 @@ SECTION("readers") {
REQUIRE(false); REQUIRE(false);
} }
} } // END SECTION
}
} // END TEST_CASE