Skip to content

Reading Quite OK Image (QOI) files is slow compared to PNG and qoi #7922

@ivanstepanovftw

Description

@ivanstepanovftw

What did you do?

image = Image.open(image_filepath)

while using PyTorch data loader with 8 workers.

What did you expect to happen?

Fast

What actually happened?

Slow

What are your OS, Python and Pillow versions?

  • OS: Linux
  • Python: 3.10.13
  • Pillow: 10.2.0

Reading PNG images with Pillow is faster.

For me, current workaround is to use https://github.com/kodonnell/qoi from PyPI (qoi package). It is faster when I switched to it. To compare:

image = qoi.read(image_filepath)

Image sizes are regular, like 800x480, 1280x600.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions