|
9 | 9 | #ifdef __GNUC__ |
10 | 10 | #define STBI_NO_SIMD |
11 | 11 | #endif |
12 | | -#include <stb/stb_image.h> |
| 12 | +#include <stb_image.h> |
13 | 13 |
|
14 | 14 | #define STB_IMAGE_WRITE_IMPLEMENTATION |
15 | 15 | #define STB_IMAGE_RESIZE_IMPLEMENTATION |
16 | | -#include <stb/deprecated/stb_image_resize.h> |
17 | | -#include <stb/stb_image_write.h> |
| 16 | +#include <stb_image_resize2.h> |
| 17 | +#include <stb_image_write.h> |
18 | 18 |
|
19 | 19 | using namespace ZEngine::Helpers; |
20 | 20 | using namespace ZEngine::Rendering::Specifications; |
@@ -657,7 +657,7 @@ namespace ZEngine::Hardwares |
657 | 657 | size_t total_pixel = width * height; |
658 | 658 | size_t buffer_size = total_pixel * 4; |
659 | 659 | output_buffer.resize(buffer_size); |
660 | | - stbir_resize_float(image_data, width, height, 0, output_buffer.data(), width, height, 0, 4); |
| 660 | + stbir_resize_float_linear(image_data, width, height, 0, output_buffer.data(), width, height, 0, static_cast<stbir_pixel_layout>(4)); |
661 | 661 |
|
662 | 662 | for (int i = 0; i < total_pixel; ++i) |
663 | 663 | { |
@@ -714,7 +714,7 @@ namespace ZEngine::Hardwares |
714 | 714 | size_t total_pixel = width * height; |
715 | 715 | size_t buffer_size = total_pixel * 4; |
716 | 716 | upload_req.Buffer.resize(buffer_size); |
717 | | - stbir_resize_uint8(image_data, width, height, 0, upload_req.Buffer.data(), width, height, 0, 4); |
| 717 | + stbir_resize_uint8_linear(image_data, width, height, 0, upload_req.Buffer.data(), width, height, 0, static_cast<stbir_pixel_layout>(4)); |
718 | 718 |
|
719 | 719 | for (int i = 0; i < total_pixel; ++i) |
720 | 720 | { |
|
0 commit comments