Mega Search
23.2 Million


Sign Up

Make a donation  
Invalid bitmap with wxWidget 2.6.1  
News Group: comp.soft-sys.wxwindows

Hello,
I have an exception in my wxWidgets program (ver 2.6.1 on Windows 7,
compiler Borland C++ builder 5) on function wxDC::Blit
Assert says :
"bmp.Ok() && bmp.HasAlpha()" failed: AlphaBlt(): invalid bitmap
I have saved my image with multiple GUI : Paint.NET, PSP5,
PhotoFiltre ...
Sometimes, it works, another time, it does'nt work. I don't understand
why.
At loading time, I create a mask if the image has no mask :
     mask = bitmap->GetMask();
     if (!mask) {
        mask = new wxMask(*bitmap, *wxWHITE);
        bitmap->SetMask(mask);
     }
It works everytime if the image has no mask -> SetMask
It never works when the image has already a mask.
I join with this message an image which is working good, and another
which is not working.
Thank you for your response.
Pierre



Vote for best question.
Score: 0  # Vote:  0
Date Posted: 15-Jun-2011, at 5:12 AM EST
From: pbpb
 
Re: Invalid bitmap with wxWidget 2.6.1  
News Group: comp.soft-sys.wxwindows
bitmap->UseAlpha(); //  ... ?

/Preben Friis

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 16-Jun-2011, at 12:38 AM EST
From: Preben Friis