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 );