From 7d205330dbf1c2fd44d9d58393ab46434ac8bb5e Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 25 Jun 2023 18:12:54 +1000 Subject: More directives optimization --- source/core/StarImageProcessing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/core/StarImageProcessing.cpp') diff --git a/source/core/StarImageProcessing.cpp b/source/core/StarImageProcessing.cpp index c2f980e..56ac130 100644 --- a/source/core/StarImageProcessing.cpp +++ b/source/core/StarImageProcessing.cpp @@ -173,7 +173,7 @@ ImageOperation imageOperationFromString(String const& string) { } else if (type == "replace") { ColorReplaceImageOperation operation; for (size_t i = 0; i < (bits.size() - 1) / 2; ++i) - operation.colorReplaceMap[Color::fromHex(bits[i * 2 + 1]).toRgba()] = Color::fromHex(bits[i * 2 + 2]).toRgba(); + operation.colorReplaceMap[Color::hexToVec4B(bits[i * 2 + 1])] = Color::hexToVec4B(bits[i * 2 + 2]); return operation; @@ -259,7 +259,7 @@ ImageOperation imageOperationFromString(String const& string) { return FlipImageOperation{FlipImageOperation::FlipXY}; } else { - throw ImageOperationException(strf("Could not recognize ImageOperation type %s", type)); + throw ImageOperationException(strf("Could not recognize ImageOperation type %s", type), false); } } catch (OutOfRangeException const& e) { throw ImageOperationException("Error reading ImageOperation", e); -- cgit v1.2.3