diff options
-rw-r--r-- | dw/fltkimgbuf.cc | 4 | ||||
-rw-r--r-- | dw/platform.hh | 3 | ||||
-rw-r--r-- | src/gif.c | 3 | ||||
-rw-r--r-- | src/jpeg.c | 2 | ||||
-rw-r--r-- | src/png.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc index 4b93601f..56a673fa 100644 --- a/dw/fltkimgbuf.cc +++ b/dw/fltkimgbuf.cc @@ -91,8 +91,8 @@ void FltkImgbuf::init (Type type, int width, int height, double gamma, case RGB: bpp = 3; break; default: bpp = 1; break; } - _MSG("FltkImgbuf::init width=%d height=%d bpp=%d gamma=%g\n", - width, height, bpp, gamma); + MSG("FltkImgbuf::init width=%d height=%d bpp=%d gamma=%g\n", + width, height, bpp, gamma); rawdata = new uchar[bpp * width * height]; // Set light-gray as interim background color. memset(rawdata, 222, width*height*bpp); diff --git a/dw/platform.hh b/dw/platform.hh index 532f4cf9..227cda33 100644 --- a/dw/platform.hh +++ b/dw/platform.hh @@ -149,8 +149,7 @@ public: /** * \brief Create a (platform speficic) image buffer. * - * "gamma" is the value by which the image data is already - * corrected. + * "gamma" is the value by which the image data is gamma-encoded. */ virtual Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height, double gamma) = 0; @@ -816,7 +816,8 @@ static size_t Gif_do_img_desc(DilloGif *gif, void *Buf, /** \todo Gamma for GIF? */ a_Dicache_set_parms(gif->url, gif->version, gif->Image, - gif->Width, gif->Height, DILLO_IMG_TYPE_INDEXED, 2.2); + gif->Width, gif->Height, DILLO_IMG_TYPE_INDEXED, + 1 / 2.2); Flags = buf[8]; @@ -303,7 +303,7 @@ static void Jpeg_write(DilloJpeg *jpeg, void *Buf, uint_t BufSize) a_Dicache_set_parms(jpeg->url, jpeg->version, jpeg->Image, (uint_t)jpeg->cinfo.image_width, (uint_t)jpeg->cinfo.image_height, - type, 2.2); + type, 1 / 2.2); /* decompression step 4 (see libjpeg.doc) */ jpeg->state = DILLO_JPEG_STARTING; @@ -204,7 +204,7 @@ Png_datainfo_callback(png_structp png_ptr, png_infop info_ptr) /** \todo Gamma for PNG? */ a_Dicache_set_parms(png->url, png->version, png->Image, (uint_t)png->width, (uint_t)png->height, - DILLO_IMG_TYPE_RGB, 2.2); + DILLO_IMG_TYPE_RGB, 1 / 2.2); } static void |