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

summaryrefslogtreecommitdiff
path: root/source/core/StarImageScaling.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-12-31 14:49:51 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-12-31 14:49:51 +1100
commit874ab3dd48a53c0cda6bb1faaeea27b52d2c1df2 (patch)
tree86c2d0d24e98b849f6bd7dd1e7abdb95baed4abe /source/core/StarImageScaling.cpp
parent9beadf3e2c6f06f43259e48629598fe77c365797 (diff)
?saturation discrepancies: fixed mostly on GCC, 100% (seemingly?) on Clang
Diffstat (limited to 'source/core/StarImageScaling.cpp')
-rw-r--r--source/core/StarImageScaling.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/core/StarImageScaling.cpp b/source/core/StarImageScaling.cpp
index 96837aa..aa94359 100644
--- a/source/core/StarImageScaling.cpp
+++ b/source/core/StarImageScaling.cpp
@@ -33,8 +33,7 @@ Image scaleBilinear(Image const& srcImage, Vec2F const& scale) {
auto ipart = Vec2I::floor(pos);
auto fpart = pos - Vec2F(ipart);
- auto result = lerp(fpart[1], lerp(fpart[0], Vec4F(srcImage.clamp(ipart[0], ipart[1])), Vec4F(srcImage.clamp(ipart[0] + 1, ipart[1]))), lerp(fpart[0],
- Vec4F(srcImage.clamp(ipart[0], ipart[1] + 1)), Vec4F(srcImage.clamp(ipart[0] + 1, ipart[1] + 1))));
+ auto result = lerp(fpart[1], lerp(fpart[0], Vec4F(srcImage.clamp(ipart[0], ipart[1])), Vec4F(srcImage.clamp(ipart[0] + 1, ipart[1]))), lerp(fpart[0], Vec4F(srcImage.clamp(ipart[0], ipart[1] + 1)), Vec4F(srcImage.clamp(ipart[0] + 1, ipart[1] + 1))));
destImage.set({x, y}, Vec4B(result));
}