From 4d711a2fe85e5ebe814e4d12cd41badda1e7a046 Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 26 Oct 2023 00:23:16 +0200 Subject: Update all svg-flatten dependencies --- svg-flatten/src/nopencv.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'svg-flatten') diff --git a/svg-flatten/src/nopencv.cpp b/svg-flatten/src/nopencv.cpp index e157ab5..e5317f5 100644 --- a/svg-flatten/src/nopencv.cpp +++ b/svg-flatten/src/nopencv.cpp @@ -9,7 +9,7 @@ #include #define STB_IMAGE_RESIZE_IMPLEMENTATION -#include +#include #define IIR_GAUSS_BLUR_IMPLEMENTATION #include "iir_gauss_blur.h" @@ -574,22 +574,24 @@ template<> void gerbolyze::nopencv::Image::resize(int new_w, int new_h) { float *old_data = m_data; m_data = new float[new_w * new_h]; - stbir_resize_float(old_data, m_cols, m_rows, 0, + stbir_resize_float_linear(old_data, m_cols, m_rows, 0, m_data, new_w, new_h, 0, - 1); + STBIR_1CHANNEL); m_cols = new_w; m_rows = new_h; + delete old_data; } template<> void gerbolyze::nopencv::Image::resize(int new_w, int new_h) { uint8_t *old_data = m_data; m_data = new uint8_t[new_w * new_h]; - stbir_resize_uint8(old_data, m_cols, m_rows, 0, + stbir_resize_uint8_linear(old_data, m_cols, m_rows, 0, m_data, new_w, new_h, 0, - 1); + STBIR_1CHANNEL); m_cols = new_w; m_rows = new_h; + delete old_data; } template gerbolyze::nopencv::Image::Image(int size_x, int size_y, const int32_t *data); -- cgit