Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
convert a PIL Image to a wx image

        def PILTowx(pimg):
        '''convert a PIL Image to a wx image'''
        import wx
        wimg = wx.EmptyImage(pimg.size[0], pimg.size[1])
        wimg.SetData(pimg.convert('RGB').tostring())
        return wimg
        


src/m/a/MAVProxy-1.3.3/MAVProxy/modules/mavproxy_map/mp_image.py   MAVProxy(Download)
            pimg = mp_util.wxToPIL(scaled_image)
            pimg = Image.eval(pimg, lambda x: int(x * state.brightness))
            scaled_image = mp_util.PILTowx(pimg)
        self.imagePanel.set_image(scaled_image)
        self.need_redraw = False

src/m/a/MAVProxy-HEAD/MAVProxy/modules/lib/mp_image.py   MAVProxy(Download)
            pimg = mp_util.wxToPIL(scaled_image)
            pimg = Image.eval(pimg, lambda x: int(x * state.brightness))
            scaled_image = mp_util.PILTowx(pimg)
        self.imagePanel.set_image(scaled_image)
        self.need_redraw = False