I just want to display python image object in wxpython panel.
What i am trying to accomplish is taking screenshot using python ImageGrab or autopy and showing it in wxpython panel. My screenshot program running every second so there is no point save the image for wx.
import pyscreenshot as ImageGrab imgobj = ImageGrab.grab() print imgobj # Convert into wximage myWxImage = wx.EmptyImage( imgobj.size[0], imgobj.size[0] ) myWxImage.SetData( imgobj.convert( 'RGB' ).tostring())
Output
<Image.Image image mode=RGB size=1366x768 at 0x20B98F0> ValueError:Invalid data buffer size.