From 6b347e7310c501b826785e9639d962ba1d448b4b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 23 Sep 2020 00:56:54 +0200 Subject: Add matrix image upload --- src/Body.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Body.cpp') diff --git a/src/Body.cpp b/src/Body.cpp index ae60da2..d650d20 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -285,9 +285,12 @@ namespace QuickMedia { if(new_image_size.x < image->getSize().x || new_image_size.y < image->getSize().y) { sf::Image destination_image; copy_resize(*image, destination_image, new_image_size); - image.reset(); - if(save_image_as_thumbnail_atomic(destination_image, thumbnail_path, get_ext(url))) + if(save_image_as_thumbnail_atomic(destination_image, thumbnail_path, get_ext(url))) { + image.reset(); result->loadFromImage(destination_image); + } else { + result->loadFromImage(*image); + } loading_thumbnail = false; return; } else { -- cgit v1.2.3