From e44cdef805366be6c33c71ffd4ffe032f1b95ff4 Mon Sep 17 00:00:00 2001 From: Blake Thompson Date: Mon, 11 May 2015 18:19:24 -0500 Subject: [PATCH] Fix get_pixel with image_view --- include/mapnik/image_view_impl.hpp | 2 +- test/unit/imaging/image_io_test.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/mapnik/image_view_impl.hpp b/include/mapnik/image_view_impl.hpp index e24fe810a..6fc85179b 100644 --- a/include/mapnik/image_view_impl.hpp +++ b/include/mapnik/image_view_impl.hpp @@ -100,7 +100,7 @@ inline std::size_t image_view::height() const template inline typename image_view::pixel_type const& image_view::operator() (std::size_t i, std::size_t j) const { - return data_(i,j); + return data_(i + x_,j + y_); } template diff --git a/test/unit/imaging/image_io_test.cpp b/test/unit/imaging/image_io_test.cpp index b6380ea84..8772ef3cd 100644 --- a/test/unit/imaging/image_io_test.cpp +++ b/test/unit/imaging/image_io_test.cpp @@ -78,5 +78,7 @@ SECTION("readers") { REQUIRE(false); } -} -} +} // END SECTION + + +} // END TEST_CASE