diff --git a/image.hpp b/image.hpp index 6e8e3eb6..713ea646 100644 --- a/image.hpp +++ b/image.hpp @@ -50,6 +50,8 @@ namespace util { namespace image { //--------------------------------------------------------------------- constexpr size_t area (void) const; + constexpr extent2u extent (void) const; + constexpr bool is_packed (void) const; size_t w; diff --git a/image.ipp b/image.ipp index 64cbb961..d8e6d60b 100644 --- a/image.ipp +++ b/image.ipp @@ -28,6 +28,16 @@ namespace util { namespace image { return w * h; } + + //------------------------------------------------------------------------- + template + constexpr extent2u + buffer::extent (void) const + { + return { w, h }; + } + + //------------------------------------------------------------------------- template constexpr bool