From e7fc08fd0e093c2f7ac16ccbbb7e541eab4f8c30 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Sun, 9 Aug 2015 07:37:53 +0800 Subject: [PATCH] fix no implementation of image_png::open interface --- source/paint/detail/image_png.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/paint/detail/image_png.hpp b/source/paint/detail/image_png.hpp index cab432cd..eda096e7 100644 --- a/source/paint/detail/image_png.hpp +++ b/source/paint/detail/image_png.hpp @@ -21,10 +21,6 @@ namespace nana : public image::image_impl_interface { public: - image_png() - { - } - bool open(const nana::char_t* png_file) override { #ifdef NANA_UNICODE @@ -148,6 +144,12 @@ namespace nana return is_opened; } + bool open(const void* data, std::size_t bytes) override + { + throw std::logic_error("PNG is not supported for raw data buffer"); + return false; + } + bool alpha_channel() const override { return pixbuf_.alpha_channel();