git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32472
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool hasAlpha = false ;
bool hasMask = false ;
bool hasAlpha = false ;
bool hasMask = false ;
+ int maskBytesPerRow = 0 ;
unsigned char *alpha = NULL ;
unsigned char *mask = NULL ;
if ( HasAlpha() )
unsigned char *alpha = NULL ;
unsigned char *mask = NULL ;
if ( HasAlpha() )
{
hasMask = true ;
mask = (unsigned char*) GetMask()->GetRawAccess() ;
{
hasMask = true ;
mask = (unsigned char*) GetMask()->GetRawAccess() ;
+ maskBytesPerRow = GetMask()->GetBytesPerRow() ;
static const int MASK_BLUE = 3;
static const int MASK_BLUE_REPLACEMENT = 2;
static const int MASK_BLUE = 3;
static const int MASK_BLUE_REPLACEMENT = 2;
- for (int yy = 0; yy < height; yy++)
+ for (int yy = 0; yy < height; yy++ , mask += maskBytesPerRow )
+ unsigned char * maskp = mask ;
for (int xx = 0; xx < width; xx++)
{
long color = *((long*) source) ;
for (int xx = 0; xx < width; xx++)
{
long color = *((long*) source) ;
unsigned char b = (color&0x000000FF);
if ( hasMask )
{
unsigned char b = (color&0x000000FF);
if ( hasMask )
{
{
if ( r == MASK_RED && g == MASK_GREEN && b == MASK_BLUE )
b = MASK_BLUE_REPLACEMENT ;
{
if ( r == MASK_RED && g == MASK_GREEN && b == MASK_BLUE )
b = MASK_BLUE_REPLACEMENT ;