From 4dff3485d65e413a2dc08f842e311a0f0f78fab5 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 12 Oct 2019 12:38:25 +0200 Subject: [PATCH] ply-pixel-buffer: Fix bottom edge rendering of scaled buffers Commit 4e1c00b89a71 (" ply-pixel-buffer: Fix right and bottom edge rendering of scaled buffers"), which tried to fix a minor rendering issue with the right and bottom edge of scaled images, contains a typo which actually makes things worse :| When checking if iy exceeds the height of the image, ix gets set to the height instead of iy leading to addressing pass part of the buffer which leads to various rendering artifacts. This commit fixes the typo and thus also the artifacts. Fixes: #83 Signed-off-by: Hans de Goede --- src/libply-splash-core/ply-pixel-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libply-splash-core/ply-pixel-buffer.c b/src/libply-splash-core/ply-pixel-buffer.c index aa4b344e..cc55a6ff 100644 --- a/src/libply-splash-core/ply-pixel-buffer.c +++ b/src/libply-splash-core/ply-pixel-buffer.c @@ -671,7 +671,7 @@ ply_pixels_interpolate (uint32_t *bytes, ix = width - 1; if (iy >= height) - ix = height - 1; + iy = height - 1; if (ix < 0 || iy < 0) pixels[offset_y][offset_x] = 0x00000000;