From 638728491d5d5abd16deb20a252676bb235a97bd Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 30 Sep 2007 20:56:15 +0000 Subject: Convolve Matrix Filter: Enable and use preserveAlpha attribute. Increase range for divisor attribute. (bzr r3818) --- src/display/nr-filter-convolve-matrix.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/display') diff --git a/src/display/nr-filter-convolve-matrix.cpp b/src/display/nr-filter-convolve-matrix.cpp index 562f3ffc4..6adf9c9a5 100644 --- a/src/display/nr-filter-convolve-matrix.cpp +++ b/src/display/nr-filter-convolve-matrix.cpp @@ -69,6 +69,9 @@ int FilterConvolveMatrix::render(FilterSlot &slot, Matrix const &trans) { out_data[4*( x + width*y )+1] = CLAMP_D_TO_U8(result_G / divisor + bias); out_data[4*( x + width*y )+2] = CLAMP_D_TO_U8(result_B / divisor + bias); out_data[4*( x + width*y )+3] = CLAMP_D_TO_U8(result_A / divisor + bias); + if( preserveAlpha ) { + out_data[4*( x + width*y )+3] = in_data[4*( x + width*y )+3]; + } } } -- cgit v1.2.3