In case anyone's planning to thumbnail some PNGs and JPEGs in Python, whether you use PyQt, PyOpenCV, or write your own little wrapper around Rust's `image` crate using PyO3 or rust-cpython, I recommend not using Pillow.

On my test corpus with a warmed cache, the others consistently took about 2/3rds the time Pillow did... though PyOpenCV was a hair slower than the others at ~25 seconds rather than ~23. (Pillow was ~33.)

@ssokolow Huh and I always though that it's particularly easy to use some shell script and ImageMagick...

@phel It's for populating the XDG shared thumbnail cache for a PyQt-based GUI I'm writing. The only reason I explored alternatives to doing it in PyQt is that I have prior experience flipping grids of pixels back and forth between PyQt and PyOpenCV and wanted to optimize for performance.

Follow

@phel Funny enough, my first "bare minimum of Geeqie's collection view, but in PyQt" tester loaded already-generated thumbnails off disk twice as fast as Geeqie... which either speaks well of Qt or poorly of whatever Geeqie's doing with GTK.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.