This commit is contained in:
Hartmut Seichter 2019-01-31 16:54:12 +01:00
parent 62281699ea
commit 7037abbcb6
11 changed files with 114 additions and 31 deletions

View file

@ -37,13 +37,15 @@ public:
bool write(const std::string& uri,uint32_t flags = 0);
~image_io();
protected:
struct impl;
std::unique_ptr<impl> _impl;
image_io() = default;
~image_io() = default;
image_io();
};

View file

@ -1,7 +1,8 @@
#include "pw/io/image_io.hpp"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include "stb_image_write.h"
// #include "stb_image_write.h"
namespace pw {
@ -26,6 +27,11 @@ struct image_io::impl
return image();
}
bool write(const std::string& uri, uint32_t flags)
{
return false;
}
};
@ -40,4 +46,22 @@ image image_io::read(const std::string &uri, uint32_t flags)
return _impl->read_impl(uri,flags);
}
bool image_io::write(const std::string &uri, uint32_t flags)
{
return _impl->write(uri,flags);
}
//
//
//
image_io::image_io()
{
_impl = make_unique<impl>();
}
image_io::~image_io()
{
}
}