summaryrefslogtreecommitdiff
path: root/src/TIFFOutputImage.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-03-16 20:35:48 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2007-03-16 20:35:48 +0100
commit40b830740a3670625b58ab2c64d4093e7b1d95d7 (patch)
tree68ba2a614b982825e3575c8a374a653f5881b9c7 /src/TIFFOutputImage.cxx
parenta3b7f7b06583d0e38db3cfc72386da7f48e4cdbf (diff)
adjust TIFF and JPEG output
Diffstat (limited to 'src/TIFFOutputImage.cxx')
-rw-r--r--src/TIFFOutputImage.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/TIFFOutputImage.cxx b/src/TIFFOutputImage.cxx
index 4034c97..156079c 100644
--- a/src/TIFFOutputImage.cxx
+++ b/src/TIFFOutputImage.cxx
@@ -62,9 +62,9 @@ TIFFOutputImage::init_internal(int w1, int h1) {
int
TIFFOutputImage::set_pixel_internal(int x, int r, int g, int b) {
- row[x*4+0] = (unsigned char) r;
- row[x*4+1] = (unsigned char) g;
- row[x*4+2] = (unsigned char) b;
+ row[x*4+0] = (unsigned char) (r / 255);
+ row[x*4+1] = (unsigned char) (g / 255);
+ row[x*4+2] = (unsigned char) (b / 255);
row[x*4+3] = 255;
return 0;