diff --git a/image.cpp b/image.cpp index f26187a6..14293039 100644 --- a/image.cpp +++ b/image.cpp @@ -122,6 +122,13 @@ private: }; +//----------------------------------------------------------------------------- +template +util::image::buffer::buffer (util::extent2u _size): + buffer (_size.w, _size.h) +{ ; } + + //----------------------------------------------------------------------------- template util::image::buffer::buffer (size_t _w, size_t _h, size_t _s): diff --git a/image.hpp b/image.hpp index d26edbb2..8acb8ff2 100644 --- a/image.hpp +++ b/image.hpp @@ -17,6 +17,8 @@ #ifndef __UTIL_IMAGE_HPP #define __UTIL_IMAGE_HPP +#include "extent.hpp" + #include #include #include @@ -29,6 +31,7 @@ namespace util { struct buffer { typedef T value_type; + buffer (util::extent2u); buffer (size_t w, size_t h); buffer (size_t w, size_t h, size_t s); buffer (size_t w, size_t h, size_t s, std::unique_ptr &&data);