|
|
@@ -97,7 +97,11 @@ pipi_pixels_t *pipi_getpixels(pipi_image_t *img, pipi_format_t type) |
|
|
|
uint8_t d; |
|
|
|
|
|
|
|
p = src[4 * (y * img->w + x) + i]; |
|
|
|
d = (int)(255.999 * pow(p, 1. / GAMMA)); |
|
|
|
|
|
|
|
if(p < 0.) d = 0.; |
|
|
|
else if(p > 1.) d = 255; |
|
|
|
else d = (int)(255.999 * pow(p, 1. / GAMMA)); |
|
|
|
|
|
|
|
dest[4 * (y * img->w + x) + i] = d; |
|
|
|
|
|
|
|
e = p - u8tof32(d); |
|
|
|