From d143b7ab7af0fac07bebfce64a4b67d1e43fe27a Mon Sep 17 00:00:00 2001 From: Victor Popkov Date: Tue, 24 Aug 2021 19:40:09 +0300 Subject: [PATCH] Enable --no-premultiply option --- src/ktech/image_processing.hpp | 8 ++++---- src/ktech/ktech_options.cpp | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ktech/image_processing.hpp b/src/ktech/image_processing.hpp index 86140d3..c7f7555 100644 --- a/src/ktech/image_processing.hpp +++ b/src/ktech/image_processing.hpp @@ -164,12 +164,12 @@ namespace ImOp { } if(!options::no_premultiply) { - if(verbosity >= 1) { + if(options::verbosity >= 1) { std::cout << "Premultiplying alpha..." << std::endl; } std::for_each( imgs.begin(), imgs.end(), ImOp::premultiplyAlpha() ); } - else if(verbosity >= 1) { + else if(options::verbosity >= 1) { std::cout << "Skipping alpha premultiplication..." << std::endl; } @@ -210,12 +210,12 @@ namespace ImOp { } if(!options::no_premultiply) { - if(verbosity >= 1) { + if(options::verbosity >= 1) { std::cout << "Demultiplying alpha..." << std::endl; } std::for_each( imgs.begin(), imgs.end(), ImOp::demultiplyAlpha() ); } - else if(verbosity >= 1) { + else if(options::verbosity >= 1) { std::cout << "Skipping alpha demultiplication..." << std::endl; } diff --git a/src/ktech/ktech_options.cpp b/src/ktech/ktech_options.cpp index 2d03f38..607094b 100644 --- a/src/ktech/ktech_options.cpp +++ b/src/ktech/ktech_options.cpp @@ -291,9 +291,7 @@ KTEX::File::Header KTech::parse_commandline_options(int& argc, char**& argv, std options::filter = filter_trans.translate(filter_opt.getValue()); - /* options::no_premultiply = no_premultiply_flag.getValue(); - */ options::no_mipmaps = no_mipmaps_flag.getValue();