use DIB, not DDB, when converting from an image with alpha channel
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -790,7 +790,9 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc )
 | 
			
		||||
    HBITMAP hbitmap;
 | 
			
		||||
 | 
			
		||||
    // are we going to use DIB?
 | 
			
		||||
    if ( wxShouldCreateDIB(w, h, depth, hdc) )
 | 
			
		||||
    //
 | 
			
		||||
    // NB: DDBs don't support alpha so if we have alpha channel we must use DIB
 | 
			
		||||
    if ( image.HasAlpha() || wxShouldCreateDIB(w, h, depth, hdc) )
 | 
			
		||||
    {
 | 
			
		||||
        // don't delete the DIB section in dib object dtor
 | 
			
		||||
        hbitmap = dib.Detach();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user