From 7f3ca0e562468ea2556d39045655efda1b9ae126 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 22 May 2017 23:31:36 +0200 Subject: [PATCH] interpolation fix --- .../src/main/java/hageldave/imagingkit/core/Img.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java b/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java index 6287be5..3657d74 100644 --- a/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java +++ b/ImagingKit_Core/src/main/java/hageldave/imagingkit/core/Img.java @@ -305,10 +305,10 @@ public int interpolateARGB(final float xNormalized, final float yNormalized){ private static int interpolateColors(final int c00, final int c01, final int c10, final int c11, final float mx, final float my){ return Pixel.argb_fast/*_bounded*/( - blend( blend(Pixel.a(c00), Pixel.a(c10), mx), blend(Pixel.a(c10), Pixel.a(c01), mx), my), - blend( blend(Pixel.r(c00), Pixel.r(c10), mx), blend(Pixel.r(c10), Pixel.r(c01), mx), my), - blend( blend(Pixel.g(c00), Pixel.g(c10), mx), blend(Pixel.g(c10), Pixel.g(c01), mx), my), - blend( blend(Pixel.b(c00), Pixel.b(c10), mx), blend(Pixel.b(c10), Pixel.b(c01), mx), my) ); + blend( blend(Pixel.a(c00), Pixel.a(c10), mx), blend(Pixel.a(c01), Pixel.a(c11), mx), my), + blend( blend(Pixel.r(c00), Pixel.r(c10), mx), blend(Pixel.r(c01), Pixel.r(c11), mx), my), + blend( blend(Pixel.g(c00), Pixel.g(c10), mx), blend(Pixel.g(c01), Pixel.g(c11), mx), my), + blend( blend(Pixel.b(c00), Pixel.b(c10), mx), blend(Pixel.b(c01), Pixel.b(c11), mx), my) ); } private static int blend(final int channel1, final int channel2, final float m){