diff options
Diffstat (limited to 'src/JPEGOutputImage.cxx')
-rw-r--r-- | src/JPEGOutputImage.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |