aboutsummaryrefslogtreecommitdiff
path: root/src/AsyncImageLoader.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-08-06 09:48:37 +0200
committerdec05eba <dec05eba@protonmail.com>2024-08-06 09:48:37 +0200
commit09b44d9681eaf66670f77cbd440300cdc22f3df3 (patch)
tree831d6b9ad914560e61cb4cbba9869d0b78e0336c /src/AsyncImageLoader.cpp
parent53448dd1f4cff1bd2b638d7c63b18848f2462229 (diff)
Manga: convert webp images to png to make them viewable
Diffstat (limited to 'src/AsyncImageLoader.cpp')
-rw-r--r--src/AsyncImageLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AsyncImageLoader.cpp b/src/AsyncImageLoader.cpp
index 1118ee6..14cfe6a 100644
--- a/src/AsyncImageLoader.cpp
+++ b/src/AsyncImageLoader.cpp
@@ -26,7 +26,7 @@
#pragma GCC diagnostic pop
namespace QuickMedia {
- static bool ffmpeg_image_to_png(const Path &thumbnail_path, const Path &destination_path) {
+ bool ffmpeg_convert_image_format(const Path &thumbnail_path, const Path &destination_path) {
const char *args[] = { "ffmpeg", "-y", "-v", "quiet", "-i", thumbnail_path.data.c_str(), "--", destination_path.data.c_str(), nullptr};
return exec_program(args, nullptr, nullptr) == 0;
}
@@ -37,7 +37,7 @@ namespace QuickMedia {
if(content_type == ContentType::IMAGE_WEBP || content_type == ContentType::IMAGE_AVIF) {
Path result_path_tmp = thumbnail_path_resized;
result_path_tmp.append(".tmp.png");
- if(!ffmpeg_image_to_png(thumbnail_path, result_path_tmp))
+ if(!ffmpeg_convert_image_format(thumbnail_path, result_path_tmp))
return false;
input_path = std::move(result_path_tmp);
}