[Python] How to convert PIL image to wximage in Python 3

Discussão em 'Python' iniciado por Stack, Setembro 6, 2025.

  1. Stack

    Stack Membro Participativo

    Hours of searching keep turning up this code:

    mywxImage = wx.EmptyImage(*size*)
    myPILImageRGB = MyPILImage.convert('RGB')
    myPILImageData = MyPILImageRGB.tostring()
    mywxImage.SetData(myPILImageData)


    But MyPILImageRGB doesn't seem to have a tostring() method.

    What I'm trying to do is display images in a Python program without using an external application.

    Continue reading...

Compartilhe esta Página