From 074e339ae3a86bc5f6deb1de52f0a722fbc00b08 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 26 Aug 2008 08:13:44 +0000 Subject: [PATCH] * pixels.c: fix a bug in the f32 to u8 RGB conversion. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2774 92316355-f0b4-4df1-b90c-862c8a59935f --- pipi/pixels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipi/pixels.c b/pipi/pixels.c index da3e371..fae3049 100644 --- a/pipi/pixels.c +++ b/pipi/pixels.c @@ -192,7 +192,7 @@ pipi_pixels_t *pipi_getpixels(pipi_image_t *img, pipi_format_t type) dest[3 * (y * img->w + x) + i] = d; - e = (p - u8tof32(d)); + e = (p - u8tof32(d)) / 8; if(x < img->w - 1) src[4 * (y * img->w + x + 1) + i] += e * 7; if(y < img->h - 1)