From 52eedcc8b98a1ba33041b882f0ed8ef1635fe6f9 Mon Sep 17 00:00:00 2001 From: lltcggie Date: Sat, 19 Mar 2016 22:48:50 +0900 Subject: [PATCH] =?UTF-8?q?GUI=E3=81=A7=E5=A4=A7=E9=87=8F=E3=81=AE?= =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=82=92=E5=85=A5=E3=82=8C=E3=81=9F=E3=83=95?= =?UTF-8?q?=E3=82=A9=E3=83=AB=E3=83=80=E3=82=92=E5=85=A5=E5=8A=9B=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F=E9=9A=9B=E3=80=81GUI=E3=81=8C=E9=95=B7?= =?UTF-8?q?=E6=99=82=E9=96=93=E3=83=95=E3=83=AA=E3=83=BC=E3=82=BA=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waifu2x-caffe-gui/Source.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/waifu2x-caffe-gui/Source.cpp b/waifu2x-caffe-gui/Source.cpp index f8cf8bd..7bacdf1 100644 --- a/waifu2x-caffe-gui/Source.cpp +++ b/waifu2x-caffe-gui/Source.cpp @@ -456,35 +456,7 @@ private: HWND hcrop = GetDlgItem(dh, IDC_COMBO_CROP_SIZE); int gcd = 1; - if (boost::filesystem::is_directory(input_path)) - { - BOOST_FOREACH(const boost::filesystem::path& p, std::make_pair(boost::filesystem::recursive_directory_iterator(input_path), - boost::filesystem::recursive_directory_iterator())) - { - - if (!boost::filesystem::is_directory(p)) - { - tstring ext(getTString(p.extension())); -#ifdef UNICODE - std::transform(ext.begin(), ext.end(), ext.begin(), ::towlower); -#else - std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower); -#endif - if (std::find(extList.begin(), extList.end(), ext) != extList.end()) - { - auto mat = Waifu2x::LoadMat(p.string()); - if (mat.empty()) - continue; - - auto size = mat.size(); - mat.release(); - - gcd = boost::math::gcd(size.width, size.height); - } - } - } - } - else + if (!boost::filesystem::is_directory(input_path)) { auto mat = Waifu2x::LoadMat(input_path.string()); if (mat.empty())