Hi,
bmp.GetDepth() returns 24 on local system.
The below error is getting generated for wx.ActivePixelData() on
remote system and wx.NativePixelData() on local system.
File
"C:\p4_qctp4061666_KUMARM-XP\source\qcom\qct\platform\brewmp\ui\mango\mai
n\latest\Tools\Atelier\trunk\Generate.py", line 382, in GenerateAllGroupwise
ret = \_GenImageData\(imgDict, project, pathPrefix\)
File
"C:\p4_qctp4061666_KUMARM-XP\source\qcom\qct\platform\brewmp\ui\mango\mai
n\latest\Tools\Atelier\trunk\Generate.py", line 1199, in _GenImageData
\_\_WritePixelVals\(bmp, f, hasAlpha\)
File
"C:\p4_qctp4061666_KUMARM-XP\source\qcom\qct\platform\brewmp\ui\mango\mai
n\latest\Tools\Atelier\trunk\Generate.py", line 1125, in __WritePixelVals
pixelData = wx\.NativePixelData\(bmp\)
File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line
966,
in __init__
\_gdi\_\.NativePixelData\_swiginit\(self,\_gdi\_\.new\_NativePixelData\(\*args\)\)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at
..\..\src\m
sw\bitmap.cpp(1287) in wxBitmap::GetRawData(): incorrect bitmap type in
wxBitmap
::GetRawData()
Regards,
Mohan Kumar
On Fri, Mar 12, 2010 at 12:00 AM, Robin Dunn <ro...@alldunn.com> wrote:
> On 3/10/10 10:20 PM, Mohan wrote:
>> wx.AlphaPixelData() is failing on windows server 2003. The sample code
>> is given below.
>> The same is working fine on windows xp. what could be the reason?
>> import wx
>> class Size(wx.Frame):
>> def __init__(self, parent, id, title):
>> wx.Frame.__init__(self, parent, id, title, size=(250, 200))
>> absFilename = "C:\Python26\Lib\site-packages\win32\Demos\images
>> \smiley.bmp"
>> bmp = wx.Bitmap(absFilename, wx.BITMAP_TYPE_BMP)
>> pixelData = wx.AlphaPixelData(bmp)
>> if not pixelData:
>> print "error"
>> else:
>> print "fine"
>> app = wx.App(False)
>> Size(None, -1, 'Test')
>> app.MainLoop()
> What does bmp.GetDepth()return on each platform? What about
> bmp.HasAlpha()? The most likely reason for wx.AlphaPixelData to fail is if
> there is no alpha channel. In that case you should either be using
> wx.NativePixelData instead, or perhaps giving the bitmap an alpha channel by
> converting to a wx.Image, calling InitAlpha, and converting back to a
> wx.Bitmap.
> --
> Robin Dunn
> Software Craftsman
>http://wxPython.org
> --
> To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com<wxPython-users%2Bunsubscribe@googlegroups.com>
> or visithttp://groups.google.com/group/wxPython-users?hl=en- Hide quoted text -
- Show quoted text -