diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-08-06 09:48:37 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-08-06 09:48:37 +0200 |
commit | 09b44d9681eaf66670f77cbd440300cdc22f3df3 (patch) | |
tree | 831d6b9ad914560e61cb4cbba9869d0b78e0336c /src/QuickMedia.cpp | |
parent | 53448dd1f4cff1bd2b638d7c63b18848f2462229 (diff) |
Manga: convert webp images to png to make them viewable
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r-- | src/QuickMedia.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 648f231..332308b 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -4230,6 +4230,15 @@ namespace QuickMedia { } } + { + FileAnalyzer file_analyzer; + if(file_analyzer.load_file(image_filepath_tmp.data.c_str(), false) && file_analyzer.get_content_type() == ContentType::IMAGE_WEBP) { + Path new_filepath = image_filepath_tmp.data + ".png"; + if(ffmpeg_convert_image_format(image_filepath_tmp, new_filepath)) + image_filepath_tmp = std::move(new_filepath); + } + } + bool rename_immediately = true; if(upscale_image_action == UpscaleImageAction::LOW_RESOLUTION) { int screen_width, screen_height; |