summaryrefslogtreecommitdiffstats
path: root/libdimension/gl.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-20 22:16:51 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-20 22:16:51 -0600
commit07d784563af19c162945c60562819269e6fc4994 (patch)
treea37e984d281c1fccb5a4cdbe7b86defa16d04091 /libdimension/gl.c
parent18b89c6edc29a009b1419e6d34bc3eef2dd911b9 (diff)
downloaddimension-07d784563af19c162945c60562819269e6fc4994.tar.xz
Calculate alpha correctly for canvas exports.
Diffstat (limited to 'libdimension/gl.c')
-rw-r--r--libdimension/gl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/gl.c b/libdimension/gl.c
index 7fd3cb9..f5f1c92 100644
--- a/libdimension/gl.c
+++ b/libdimension/gl.c
@@ -82,7 +82,7 @@ dmnsn_gl_write_canvas(const dmnsn_canvas *canvas)
for (size_t x = 0; x < width; ++x) {
pixel = pixels + 4*(y*width + x);
- color = dmnsn_get_pixel(canvas, x, y);
+ color = dmnsn_remove_filter(dmnsn_get_pixel(canvas, x, y));
/* Saturate R, G, and B to [0, UINT16_MAX] */
@@ -167,7 +167,7 @@ dmnsn_gl_optimizer_fn(const dmnsn_canvas *canvas,
dmnsn_canvas_optimizer optimizer, size_t x, size_t y)
{
GLushort *pixel = (GLushort *)optimizer.ptr + 4*(y*canvas->width + x);
- dmnsn_color color = dmnsn_get_pixel(canvas, x, y);
+ dmnsn_color color = dmnsn_remove_filter(dmnsn_get_pixel(canvas, x, y));
/* Saturate R, G, and B to [0, UINT16_MAX] */