diff --git a/include/mapnik/image_any.hpp b/include/mapnik/image_any.hpp index b5d539d39..707f8248a 100644 --- a/include/mapnik/image_any.hpp +++ b/include/mapnik/image_any.hpp @@ -24,6 +24,7 @@ #define MAPNIK_IMAGE_ANY_HPP #include +#include #include namespace mapnik { diff --git a/include/mapnik/image_impl.hpp b/include/mapnik/image_impl.hpp index ac7d090ff..e47f2a086 100644 --- a/include/mapnik/image_impl.hpp +++ b/include/mapnik/image_impl.hpp @@ -312,19 +312,6 @@ inline image_dtype image::get_dtype() const return dtype; } -/* -using image_rgba8 = image; -using image_gray8 = image; -using image_gray8s = image; -using image_gray16 = image; -using image_gray16s = image; -using image_gray32 = image; -using image_gray32s = image; -using image_gray32f = image; -using image_gray64 = image; -using image_gray64s = image; -using image_gray64f = image; -*/ } // end ns #endif // MAPNIK_IMAGE_IMPL_HPP diff --git a/src/image_null.cpp b/include/mapnik/image_null.hpp similarity index 85% rename from src/image_null.cpp rename to include/mapnik/image_null.hpp index 595cfc358..531f9fb7c 100644 --- a/src/image_null.cpp +++ b/include/mapnik/image_null.hpp @@ -1,4 +1,3 @@ - /***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) @@ -21,9 +20,12 @@ * *****************************************************************************/ +#ifndef MAPNIK_IMAGE_NULL_HPP +#define MAPNIK_IMAGE_NULL_HPP + // mapnik #include -#include +//#include #include //stl @@ -49,12 +51,13 @@ public: image(image const& rhs) {} image(image && rhs) noexcept {} - void swap(image & rhs) {} std::size_t width() const { return 0; } std::size_t height() const { return 0; } unsigned getSize() const { return 0; } unsigned getRowSize() const { return 0; } void set(pixel_type const& t) { throw std::runtime_error("Can not set values for null image"); } + pixel_type& operator() (std::size_t i, std::size_t j) { throw std::runtime_error("Can not get or set values for null image"); } + const pixel_type& operator() (std::size_t i, std::size_t j) const { throw std::runtime_error("Can not get or set values for null image"); } const unsigned char* getBytes() const { return nullptr; } unsigned char* getBytes() {return nullptr; } double get_offset() const { return 0.0; } @@ -69,3 +72,5 @@ public: }; } // end ns mapnik + +#endif // MAPNIK_IMAGE_NULL_HPP diff --git a/src/build.py b/src/build.py index 00bb95346..0d9ebcaf9 100644 --- a/src/build.py +++ b/src/build.py @@ -178,7 +178,6 @@ source = Split( image_view.cpp image_view_any.cpp image_any.cpp - image_null.cpp image_util.cpp image_util_jpeg.cpp image_util_png.cpp diff --git a/src/image.cpp b/src/image.cpp index cb14729fe..a899ec164 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -23,6 +23,7 @@ // mapnik #include #include +#include #include #include