aboutsummaryrefslogtreecommitdiff
path: root/src/Body.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-23 00:56:54 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-23 01:00:37 +0200
commit6b347e7310c501b826785e9639d962ba1d448b4b (patch)
tree6d84b547078d009565a75ac2df42423c06c578b7 /src/Body.cpp
parenta8e0846a7c111a8d5b5cf8592ecb9b9bbd15ce26 (diff)
Add matrix image upload
Diffstat (limited to 'src/Body.cpp')
-rw-r--r--src/Body.cpp7
1 files changed, 5 insertions, 2 deletions
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 {