Added graphics/ImageData class

This commit is contained in:
MihailRis
2023-11-12 03:26:06 +03:00
parent a91fbe7166
commit ffd3e3f852
9 changed files with 110 additions and 61 deletions
+14
View File
@@ -0,0 +1,14 @@
#include "ImageData.h"
ImageData::ImageData(ImageFormat format, uint width, uint height, void* data)
: format(format), width(width), height(height), data(data) {
}
ImageData::~ImageData() {
switch (format) {
case ImageFormat::rgb888:
case ImageFormat::rgba8888:
delete[] data;
break;
}
}