summaryrefslogtreecommitdiffstats
path: root/libdimension/png.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-04-22 12:23:25 -0400
committerTavian Barnes <tavianator@gmail.com>2011-04-22 12:23:25 -0400
commit1208ac55766e410f7cac3ad9d6cf588e7846ca64 (patch)
tree3ab0da80e8724fc51c8294f90b34ab8afc3d528e /libdimension/png.c
parenta7cd3703ea1ff4686d49888f014c746b56411fdf (diff)
downloaddimension-1208ac55766e410f7cac3ad9d6cf588e7846ca64.tar.xz
Take into account color intensity for filtered transparency in canvas export.
Diffstat (limited to 'libdimension/png.c')
-rw-r--r--libdimension/png.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdimension/png.c b/libdimension/png.c
index 9ff2afc..7a327d6 100644
--- a/libdimension/png.c
+++ b/libdimension/png.c
@@ -94,7 +94,7 @@ dmnsn_png_optimizer_fn(const dmnsn_canvas *canvas,
pixel[2] = sRGB.B*UINT16_MAX;
}
- double alpha = color.filter + color.trans;
+ double alpha = dmnsn_color_intensity(color)*color.filter + color.trans;
if (alpha <= 0.0) {
pixel[3] = 0;
} else if (alpha >= 1.0) {