From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2004-08-06 22:50:08
|
Hello..I'm just getting into Pythoncard, so if any of my questions fall into the categories of FAQ or RTFM, please don't hesitate to let me know... I'm creating an application that mimics the output of a database report writer, allowing the user to add extra notes that get stored along with the "proper" data. To do this I want to display a bitmap - the sample one to start is a little unusual - it's a 1000 x 630 pixels x 16-bit BMP file. When I try to use this in the resource editor as a background I get: wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in ..\..\src\ms w\dc.cpp(1024): invalid bitmap in wxDC::DrawBitmap (this isn't the full traceback, but I have that if anyone's interested). My first thought is that my bitmap is just too odd - would this be correct? I've worked around the problem by using the same bitmap file in an Image component (some questions on that to follow!) Neil |
From: Andy T. <an...@ha...> - 2004-08-07 12:35:37
|
XXXXXXXXXXX wrote: > Hello..I'm just getting into Pythoncard, so if any of my questions fall > into the categories of FAQ or RTFM, please don't hesitate to let me know... > > I'm creating an application that mimics the output of a database report > writer, allowing the user to add extra notes that get stored along with > the "proper" data. To do this I want to display a bitmap - the sample one > to start is a little unusual - it's a 1000 x 630 pixels x 16-bit BMP > file. When I try to use this in the resource editor as a background I get: > > wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in > ..\..\src\ms > w\dc.cpp(1024): invalid bitmap in wxDC::DrawBitmap > > (this isn't the full traceback, but I have that if anyone's interested). > > My first thought is that my bitmap is just too odd - would this be > correct? I've worked around the problem by using the same bitmap file in > an Image component (some questions on that to follow!) > > Neil > > > > ------------------------------------------------------- > This SF.Net email is sponsored by OSTG. Have you noticed the changes on > Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, > one more big change to announce. We are now OSTG- Open Source Technology > Group. Come see the changes on the new OSTG site. www.ostg.com > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users It's a bit tricky to figure out what's going on without your code. Perhaps you could show us the method where you are loading up the bitmap. Even better, a version of the minimal sample including your code and which shows the error would help the list subscribers to figure out what may be going wrong. Regards, Andy -- -------------------------------------------------------------------------------- From the desk of Andrew J Todd esq - http://www.halfcooked.com/ |
From: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - 2004-08-07 20:46:16
|
On Sat, 7 Aug 2004 13:35:28 +0100, Andy Todd wrote: >It's a bit tricky to figure out what's going on without your code. >Perhaps you could show us the method where you are loading up the bitmap. > >Even better, a version of the minimal sample including your code and >which shows the error would help the list subscribers to figure out what >may be going wrong. > The error's actually appearing in the console window for the resource editor - I open the background info window and use the file browser button for the "Image:" field, select the bitmap file and then try to close the info window. Any redrawing of the resource window keeps bringing up the error. I just tried this on OSX and I get a dialog appearing with the following: "Can't load image from file 'page1b.bmp': file does not exist. no bitmap handler for type 1 defined" This is with an existing project, or creating a new one and using the resource editor 'wizard' to generate the necessary .rsrc.py file in while case the background section looks like: 'backgrounds': [ {'type':'Background', 'name':'bgTemplate', 'title':'Standard Template with File->Exit menu', 'position':(267, 301), 'size':(800, 600), 'image':'page1b.bmp', 'style':['resizeable'], I decided to try out a 'safe' bitmap file of 640x480x8 bit (BMP and JPG) but got the same issue. Neil |
From: Kevin A. <al...@se...> - 2004-08-07 15:39:08
|
On Aug 6, 2004, at 3:31 PM, XXXXXXXXXXX wrote: > Hello..I'm just getting into Pythoncard, so if any of my questions fall > into the categories of FAQ or RTFM, please don't hesitate to let me > know... > > I'm creating an application that mimics the output of a database report > writer, allowing the user to add extra notes that get stored along with > the "proper" data. To do this I want to display a bitmap - the sample > one > to start is a little unusual - it's a 1000 x 630 pixels x 16-bit BMP > file. When I try to use this in the resource editor as a background I > get: > > wx.core.PyAssertionError: C++ assertion "wxAssertFailure" failed in > ..\..\src\ms > w\dc.cpp(1024): invalid bitmap in wxDC::DrawBitmap > > (this isn't the full traceback, but I have that if anyone's > interested). > > My first thought is that my bitmap is just too odd - would this be > correct? I've worked around the problem by using the same bitmap file > in > an Image component (some questions on that to follow!) > > Neil There have been some wxWidget/wxPython bugs that could account for this problem, but neither of the ones I submitted below actually led to an assert. http://sourceforge.net/tracker/? func=detail&aid=885104&group_id=9863&atid=109863 http://sourceforge.net/tracker/? func=detail&aid=909546&group_id=9863&atid=109863 If you want, you can wait for wxPython 2.5.2.3 to be released or try the wxPython-dev developer preview and see if it fixes the problem. http://starship.python.net/crew/robind/wxPython/preview/2.5.2.3/ Of course, there could be a bug in PythonCard, but that sounds unlikely given the error you reported. If the image can't be handled by wxWidgets, then I would like to get it from you, but don't email it to the list. Send me an email offlist with the size of the image and we'll figure out how to transfer it so I can reproduce the problem. ka |