Skip to content

Commit

Permalink
Update all svg-flatten dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jaseg committed Oct 25, 2023
1 parent 00eb959 commit 4d711a2
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
12 changes: 7 additions & 5 deletions svg-flatten/src/nopencv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <stb_image.h>

#define STB_IMAGE_RESIZE_IMPLEMENTATION
#include <stb_image_resize.h>
#include <stb_image_resize2.h>

#define IIR_GAUSS_BLUR_IMPLEMENTATION
#include "iir_gauss_blur.h"
Expand Down Expand Up @@ -574,22 +574,24 @@ template<>
void gerbolyze::nopencv::Image<float>::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<uint8_t>::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<int32_t>::Image(int size_x, int size_y, const int32_t *data);
Expand Down
2 changes: 1 addition & 1 deletion upstream/minunit
Submodule minunit updated 2 files
+2 −0 README.md
+8 −8 minunit.h

0 comments on commit 4d711a2

Please sign in to comment.