refactor export equirectangular

This commit is contained in:
2019-08-15 19:12:50 +02:00
parent e959fb4d91
commit 542e5a9c19
12 changed files with 223 additions and 206 deletions

View File

@@ -39,11 +39,19 @@ bool Image::load_file(std::string filename)
return true;
}
bool Image::save(const std::string& path)
bool Image::save_png(const std::string& path)
{
bool ret = stbi_write_png(path.c_str(), width, height, comp, data(), 0);
if (!ret)
LOG("failed Image::save %s", path.c_str());
LOG("failed Image::save_png %s", path.c_str());
return ret;
}
bool Image::save_jpg(const std::string& path, int quality)
{
bool ret = stbi_write_jpg(path.c_str(), width, height, comp, data(), quality);
if (!ret)
LOG("failed Image::save_jpg %s", path.c_str());
return ret;
}