diff --git a/src/serializer.h b/src/serializer.h index fb5e15a..5e97219 100644 --- a/src/serializer.h +++ b/src/serializer.h @@ -703,6 +703,7 @@ public: img.comp = 4; img.width = rect.width(); img.height = rect.height(); + img.size = pixels * 4; img.data = std::make_unique(pixels * 4); auto out = reinterpret_cast(img.data.get()); if (grayscale)