refactor export equirectangular
This commit is contained in:
@@ -11,13 +11,14 @@ public:
|
||||
bool load_file(std::string filename);
|
||||
const uint8_t* data() const { return m_data.get(); }
|
||||
int size() const { return width * height * comp; }
|
||||
bool save(const std::string& path);
|
||||
void create(int w, int h)
|
||||
bool save_png(const std::string& path);
|
||||
bool save_jpg(const std::string& path, int quality);
|
||||
void create(int w, int h, uint8_t* data = nullptr)
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
comp = 4;
|
||||
m_data = std::make_unique<uint8_t[]>(size());
|
||||
m_data = data ? std::unique_ptr<uint8_t[]>(data) : std::make_unique<uint8_t[]>(size());
|
||||
}
|
||||
void copy_from(const uint8_t* data)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user