implement add and remove custom brushes

This commit is contained in:
2019-02-02 16:53:33 +01:00
parent e9ead45447
commit d8728344c4
5 changed files with 153 additions and 42 deletions

View File

@@ -39,6 +39,11 @@ bool Image::load_file(std::string filename)
return true;
}
bool Image::save(const std::string& path)
{
return stbi_write_png(path.c_str(), width, height, comp, data(), 0);
}
void Image::flip()
{
auto flipped = std::make_unique<uint8_t[]>(width*height*4);