From 541e0213f7b9e0b315420b408d7f2600ce1accf3 Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 26 Aug 2008 08:15:00 +0000 Subject: [PATCH] * Goddammit, this time I'm fixing the f32 to u8 RGB conversion for real. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2775 92316355-f0b4-4df1-b90c-862c8a59935f --- pipi/pixels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipi/pixels.c b/pipi/pixels.c index fae3049..13e6b2e 100644 --- a/pipi/pixels.c +++ b/pipi/pixels.c @@ -156,7 +156,7 @@ pipi_pixels_t *pipi_getpixels(pipi_image_t *img, pipi_format_t type) dest[4 * (y * img->w + x) + i] = d; - e = (p - u8tof32(d)) / 8; + e = (p - u8tof32(d)) / 16; if(x < img->w - 1) src[4 * (y * img->w + x + 1) + i] += e * 7; if(y < img->h - 1) @@ -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)) / 8; + e = (p - u8tof32(d)) / 16; if(x < img->w - 1) src[4 * (y * img->w + x + 1) + i] += e * 7; if(y < img->h - 1)