[Jahshaka-cvs] openlibraries/src/openmedialib/plugins/gensys gensys_plugin.cpp, 1.34, 1.35
Status: Beta
Brought to you by:
jahshaka
From: Charles Y. <lil...@us...> - 2007-04-17 05:32:51
|
Update of /cvsroot/openlibraries/openlibraries/src/openmedialib/plugins/gensys In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14691 Modified Files: gensys_plugin.cpp Log Message: + Fixes the mix case for the background with alpha/foreground without alpha case Index: gensys_plugin.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/src/openmedialib/plugins/gensys/gensys_plugin.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- gensys_plugin.cpp 17 Apr 2007 04:58:55 -0000 1.34 +++ gensys_plugin.cpp 17 Apr 2007 05:32:21 -0000 1.35 @@ -861,7 +861,7 @@ int temp_w = src_width; while( temp_w -- ) { - *dst_ptr = static_cast< unsigned char >( ( *dst_ptr * ( ( 1 << 8 ) - 255 ) + *src_ptr * 255 ) >> 8 ); + *dst_ptr = static_cast< unsigned char >( ( *dst_ptr * ( xim ) + *src_ptr * mix ) >> 8 ); *dst_alpha_ptr = 255 + *dst_alpha_ptr - ( ( 255 * *dst_alpha_ptr ) >> 8 ); src_ptr ++; dst_ptr ++; |