Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarImageProcessing.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-25 18:12:54 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-25 18:12:54 +1000
commit7d205330dbf1c2fd44d9d58393ab46434ac8bb5e (patch)
treee73db06236120e2399f0b4863257477eec528295 /source/core/StarImageProcessing.cpp
parente2424b7dcf60d18b277b092eb7f2a947fff27415 (diff)
More directives optimization
Diffstat (limited to 'source/core/StarImageProcessing.cpp')
-rw-r--r--source/core/StarImageProcessing.cpp4
1 files changed, 2 insertions, 2 deletions
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);