Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid bitmap with wxWidget 2.6.1

30 views
Skip to first unread message

pbpb

unread,
Jun 15, 2011, 8:12:09 AM6/15/11
to
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


Preben Friis

unread,
Jun 15, 2011, 6:38:22 PM6/15/11
to
bitmap->UseAlpha(); // ... ?

/Preben Friis

0 new messages