From 40b830740a3670625b58ab2c64d4093e7b1d95d7 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 16 Mar 2007 20:35:48 +0100 Subject: adjust TIFF and JPEG output --- src/JPEGOutputImage.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/JPEGOutputImage.cxx') diff --git a/src/JPEGOutputImage.cxx b/src/JPEGOutputImage.cxx index bfe4595..0a5eb00 100644 --- a/src/JPEGOutputImage.cxx +++ b/src/JPEGOutputImage.cxx @@ -69,9 +69,9 @@ JPEGOutputImage::init_internal(int w1, int h1) { int JPEGOutputImage::set_pixel_internal(int x, int r, int g, int b) { - row[x*3+0] = (unsigned char) r; - row[x*3+1] = (unsigned char) g; - row[x*3+2] = (unsigned char) b; + row[x*3+0] = (unsigned char) (r / 255); + row[x*3+1] = (unsigned char) (g / 255); + row[x*3+2] = (unsigned char) (b / 255); return 0; } -- cgit v1.2.3