Use configured algorithm to convert RGB -> Indexed by default

This commit is contained in:
David Capello 2021-05-09 12:58:27 -03:00
parent 19d7566249
commit 8a22fe220c

View File

@ -548,8 +548,10 @@ void ChangePixelFormatCommand::onLoadParams(const Params& params)
m_rgbmap = doc::RgbMapAlgorithm::OCTREE;
else if (rgbmap == "rgb5a3")
m_rgbmap = doc::RgbMapAlgorithm::RGB5A3;
else
m_rgbmap = doc::RgbMapAlgorithm::DEFAULT;
else {
// Use the configured algorithm by default.
m_rgbmap = Preferences::instance().experimental.rgbmapAlgorithm();
}
std::string toGray = params.get("toGray");
if (toGray == "luma")