fix bug serializing image class
This commit is contained in:
@@ -703,6 +703,7 @@ public:
|
|||||||
img.comp = 4;
|
img.comp = 4;
|
||||||
img.width = rect.width();
|
img.width = rect.width();
|
||||||
img.height = rect.height();
|
img.height = rect.height();
|
||||||
|
img.size = pixels * 4;
|
||||||
img.data = std::make_unique<uint8_t[]>(pixels * 4);
|
img.data = std::make_unique<uint8_t[]>(pixels * 4);
|
||||||
auto out = reinterpret_cast<glm::u8vec4*>(img.data.get());
|
auto out = reinterpret_cast<glm::u8vec4*>(img.data.get());
|
||||||
if (grayscale)
|
if (grayscale)
|
||||||
|
|||||||
Reference in New Issue
Block a user