diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/AsyncImageLoader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp index d719480..0ddc10c 100644 --- a/src/AsyncImageLoader.cpp +++ b/src/AsyncImageLoader.cpp @@ -84,7 +84,10 @@ namespace QuickMedia { } else { mgl::vec2i clamped_size = clamp_to_size(image.get_size(), mgl::vec2i(resize_target_size.x, resize_target_size.y)); unsigned char *output_pixels = new unsigned char[clamped_size.x * clamped_size.y * image.get_num_channels()]; - stbir_resize_uint8(image.data(), image.get_size().x, image.get_size().y, 0, output_pixels, clamped_size.x, clamped_size.y, 0, image.get_num_channels()); + if(!stbir_resize_uint8(image.data(), image.get_size().x, image.get_size().y, 0, output_pixels, clamped_size.x, clamped_size.y, 0, image.get_num_channels())) { + fprintf(stderr, "Failed to resize %s\n", thumbnail_path_resized.data.c_str()); + _exit(1); + } if(image.get_num_channels() == 4) { if(!stbi_write_png(result_path_tmp.data.c_str(), clamped_size.x, clamped_size.y, 4, output_pixels, 0)) { |