Opened 6 years ago

Closed 6 years ago

#2815 closed defect (fixed)

Grass and Pillow > 3.0.0

Reported by: pmav99 Owned by: grass-dev@…
Priority: normal Milestone: 7.0.3
Component: wxGUI Version: unspecified
Keywords: animation, PIL Cc:
CPU: All Platform: Unspecified


Pillow since version 3.0.0 removed the fromstring() method[1]. AFAIK the only usage of the fromstring() method in GRASS in g.gui.animation:

$ ag fromstring

[omit etree.fromstring() results]

263:    pilImage.fromstring(image.GetData())

I believe it is rather safe to replace the call with frombytes(). If we need to keep compatibility with the original PIL I guess that something like this would do it:

def WxImageToPil(image):
    """Converts wx.Image to PIL image"""
    pilImage ='RGB', (image.GetWidth(), image.GetHeight()))
    except Exception:
        # We are using the original Pil or an old Pillow version
    return pilImage


Change History (5)

comment:2 Changed 6 years ago by annakrat

Keywords: PIL added

Fixed in r67012. Please test.

comment:3 Changed 6 years ago by pmav99

Resolution: fixed
Status: newclosed

comment:4 in reply to:  3 Changed 6 years ago by neteler

Resolution: fixed
Status: closedreopened

Replying to pmav99:

Resolution set to fixed Status changed from new to closed

Didn't you want the fix also in 7.0? The backport has not happened yet, so please don't close the ticket yet. Or is no backport wanted?

comment:5 Changed 6 years ago by annakrat

Resolution: fixed
Status: reopenedclosed

Backported in r67035.

Note: See TracTickets for help on using tickets.