From 1eba4f2187b0dbe485261285d3d4f72dc30d82df Mon Sep 17 00:00:00 2001 From: K4YT3X Date: Sat, 13 Jun 2020 05:09:10 -0400 Subject: [PATCH] patching waifu2x-converter-cpp libw2xc.so not found issue --- src/wrappers/waifu2x_converter_cpp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wrappers/waifu2x_converter_cpp.py b/src/wrappers/waifu2x_converter_cpp.py index 34819d3..14ca32e 100755 --- a/src/wrappers/waifu2x_converter_cpp.py +++ b/src/wrappers/waifu2x_converter_cpp.py @@ -4,7 +4,7 @@ Name: Waifu2x Converter CPP Driver Author: K4YT3X Date Created: February 8, 2019 -Last Modified: June 7, 2020 +Last Modified: June 13, 2020 Description: This class is a high-level wrapper for waifu2x-converter-cpp. @@ -82,6 +82,10 @@ class WrapperMain: threads {int} -- number of threads """ + # waifu2x-converter-cpp cannot fine libw2xc.so under Linux + # if the working directory is not waifu2x-converter-cpp's directory + os.chdir(pathlib.Path(self.driver_settings['path']).parent) + # overwrite config file settings self.driver_settings['input'] = input_directory self.driver_settings['output'] = output_directory