X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d76048f514b0de4307c2490f8806bf41033bc81a..fb29dcac01af849053d8f85b69aae7e7ca8c7d26:/src/mgl/bitmap.cpp?ds=sidebyside diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index 12e0bbeac9..34183dd8a6 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -2,7 +2,7 @@ // Name: bitmap.cpp // Author: Vaclav Slavik // RCS-ID: $Id$ -// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -281,7 +281,7 @@ bool wxBitmap::CreateFromXpm(const char **bits) return TRUE; } -wxBitmap::wxBitmap(const wxImage& image, int depth = -1) +wxBitmap::wxBitmap(const wxImage& image, int depth) { long width, height; @@ -845,8 +845,8 @@ bool wxPNGBitmapHandler::LoadFile(wxBitmap *bitmap, const wxString& name, s = ((wxUint32*)bmp->surface) + y * bmp->bytesPerLine/4; for (x = 0; x < bmp->width; x++, s ++) { - if ( ((((*s) >> bmp->pf->rsvdPos) & bmp->pf->rsvdMask) - << bmp->pf->rsvdAdjust) < 128 ) + if ( ((((*s) >> bmp->pf->alphaPos) & bmp->pf->alphaMask) + << bmp->pf->alphaAdjust) < 128 ) *s = 0; else *s = 0x00FFFFFF; // white