-
That's some pretty aggressive editorializing in the title. The linked page doesn't once use "faster", "VIPS" or "PIL".
The page does link to benchmarks [0] but Photon isn't the clear victor. It's slower on the PNG benchmark but faster on the JPG benchmark. There are no benchmarks for PIL.
It's an interesting project but the differentiating factor is more portability and security than speed. WASM means that this can be run in a nice sandbox where its ability to harm the system is drastically reduced.
[0]: https://github.com/silvia-odwyer/photon/wiki/Benchmarks
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
I just wanted to give a huge shout-out to the excellent zune-jpeg library: https://github.com/etemesi254/zune-image/tree/dev/crates/zun...
Most Python libraries like PIL rely on some flavor of the venerable libjpeg (e.g. libjpegturbo, mozjpeg) which makes it the de-facto standard for loading jpegs.
A notable downside is that it's written in C and there have been more than a few exploits found inside it over the years. While it's pretty damn mature by now and there has been a huge amount of fuzzing done to tease out remaining issues, fact remains that it's yet another attack vector that makes your resident security guy or gal raise a few eyebrows.
With zune-jpeg you get a fully memory-safe implementation that can act as a drop-in replacement, and when you turn on the (admittedly experimental) SIMD support for things like the IDCT and color-space conversion it's as fast, or in places even faster, than libjpegturbo/mozjpeg, even on very large (e.g. 4k by 4k) images.
Related posts
-
Dynamic watermarking on the JVM
-
Show HN: OS Image processing API running on edge functions using Rust and WASM
-
Rust/WebAssembly image processing library
-
Off my chest: When are some of you browser devs gonna give us native image scaling? This is the best we got ATM.
-
Why JPEG XL Ignoring Bit Depth Is Genius (and Why AVIF Can't Pull It Off)