Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/StarImage.cpp2
-rw-r--r--source/core/StarStaticVector.hpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/source/core/StarImage.cpp b/source/core/StarImage.cpp
index f41e034..363e156 100644
--- a/source/core/StarImage.cpp
+++ b/source/core/StarImage.cpp
@@ -184,6 +184,8 @@ tuple<Vec2U, PixelFormat> Image::readPngMetadata(IODevicePtr device) {
channels += 1;
}
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+
Vec2U imageSize{img_width, img_height};
PixelFormat pixelFormat = channels == 3 ? PixelFormat::RGB24 : PixelFormat::RGBA32;
diff --git a/source/core/StarStaticVector.hpp b/source/core/StarStaticVector.hpp
index 51987e1..91a2e41 100644
--- a/source/core/StarStaticVector.hpp
+++ b/source/core/StarStaticVector.hpp
@@ -2,6 +2,7 @@
#define STAR_STATIC_VECTOR_HPP
#include "StarException.hpp"
+#include "StarFormat.hpp"
namespace Star {