summaryrefslogtreecommitdiffstats
path: root/libdimension/rgba16.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/rgba16.c')
-rw-r--r--libdimension/rgba16.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libdimension/rgba16.c b/libdimension/rgba16.c
index 980a2d3..5dee049 100644
--- a/libdimension/rgba16.c
+++ b/libdimension/rgba16.c
@@ -49,15 +49,15 @@ void
dmnsn_rgba16_optimizer_fn(const dmnsn_canvas *canvas,
dmnsn_canvas_optimizer optimizer, size_t x, size_t y)
{
- uint16_t *pixel = (uint16_t *)optimizer.ptr + 4*(y*canvas->width + x);
+ uint8_t *pixel = (uint8_t *)optimizer.ptr + 4*(y*canvas->width + x);
dmnsn_color color;
color = dmnsn_canvas_get_pixel(canvas, x, y);
color = dmnsn_remove_filter(color);
color = dmnsn_color_to_sRGB(color);
color = dmnsn_color_saturate(color);
- pixel[0] = lround(color.R*UINT16_MAX);
- pixel[1] = lround(color.G*UINT16_MAX);
- pixel[2] = lround(color.B*UINT16_MAX);
- pixel[3] = lround(color.trans*UINT16_MAX);
+ pixel[0] = lround(color.R*UINT8_MAX);
+ pixel[1] = lround(color.G*UINT8_MAX);
+ pixel[2] = lround(color.B*UINT8_MAX);
+ pixel[3] = lround(color.trans*UINT8_MAX);
}