Merge branch 'master' into spirit-x3

This commit is contained in:
artemp 2016-08-24 08:47:22 +01:00
commit 67f5470d3e

View file

@ -21,7 +21,7 @@
*****************************************************************************/ *****************************************************************************/
#include "catch.hpp" #include "catch.hpp"
#include <cstdlib>
#include <mapnik/map.hpp> #include <mapnik/map.hpp>
#include <mapnik/load_map.hpp> #include <mapnik/load_map.hpp>
#include <mapnik/agg_renderer.hpp> #include <mapnik/agg_renderer.hpp>
@ -45,8 +45,10 @@ TEST_CASE("ogr") {
mapnik::image_rgba8 im(256,256); mapnik::image_rgba8 im(256,256);
mapnik::agg_renderer<mapnik::image_rgba8> ren(m, im); mapnik::agg_renderer<mapnik::image_rgba8> ren(m, im);
ren.apply(); ren.apply();
//mapnik::save_to_file(im, "./test/data/images/point_json.png");
std::string filename("./test/data/images/point_json.png"); std::string filename("./test/data/images/point_json.png");
if (std::getenv("UPDATE") != nullptr) {
mapnik::save_to_file(im, filename);
}
std::unique_ptr<mapnik::image_reader> reader(mapnik::get_image_reader(filename,"png")); std::unique_ptr<mapnik::image_reader> reader(mapnik::get_image_reader(filename,"png"));
mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height()); mapnik::image_any data = reader->read(0, 0, reader->width(), reader->height());
mapnik::image_rgba8 expected = mapnik::util::get<mapnik::image_rgba8>(data); mapnik::image_rgba8 expected = mapnik::util::get<mapnik::image_rgba8>(data);