Skip to content

memory leak when loading images in webp format with Pillow 5.0.0 #2972

@Dobiasd

Description

@Dobiasd

With Pillow 4.3.0 the following code works fine with constant memory usage.

# download example image here:
# http://www.gstatic.com/webp/gallery/1.webp
from PIL import Image
while True:
    img = Image.open('1.webp') # no problem with png
    img = img.convert('L') # just a dummy operation on the image
    print(img.size)

When using Pillow 5.0.0 however, the memory usage of the process constantly grows quite fast.

I'm using Python 3.5.2 and Ubuntu 16.04.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions