WiP
This commit is contained in:
parent
62281699ea
commit
7037abbcb6
11 changed files with 114 additions and 31 deletions
|
@ -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();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue