X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d275c7eb8420c81e97a8b308c60c27d9856b58f9..2fe212b0336512aac9eace69fab09ce856b0bf4b:/src/msw/bitmap.cpp?ds=sidebyside diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index a68e54fa7d..df9dcd8c70 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -431,6 +431,9 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) if (depth == -1) depth = wxDisplayDepth(); SetDepth( depth ); + // Copy the palette from the source image + SetPalette(image.GetPalette()); + // create a DIB header int headersize = sizeof(BITMAPINFOHEADER); BITMAPINFO *lpDIBh = (BITMAPINFO *) malloc( headersize );