wx.AlphaPixelData() is failing on windows server 2003

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()

···

--
View this message in context: http://old.nabble.com/wx.AlphaPixelData()-is-failing-on-windows-server-2003-tp27847892p27847892.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.

Is this bug related to matplotlib? (i.e. does it happen only when matplotlib is imported?) If not, you may have more luck on the wxpython mailing list.

Mike

MOhanKumar 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()

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom wrote:

Is this bug related to matplotlib? (i.e. does it happen only when matplotlib is imported?)

It looks like you've done a pure-wx test, so it is a wx issue.

If not, you may have more luck on the wxpython mailing list.

yup, that's the place for it -- I suspect that windows server 2003 is old enough that it may not have the newer alpha-supporting drawing stuff -- that may be a dll that you could add, though.

You'll get a better answer on the wxpython-users list.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...236...