fast_image_resize
portable-simd
Our great sponsors
fast_image_resize | portable-simd | |
---|---|---|
3 | 19 | |
228 | 810 | |
- | 3.5% | |
7.7 | 8.7 | |
6 days ago | 14 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fast_image_resize
-
Rust/WebAssembly image processing library
Unfortunately mostly useless for professional applications.
It fails the most simple test from [0] in the online demo[1]. ImageMagic also has a page about this[2]. I.e. also try the 'city lights' test with the online demo to see it fail for the same reason.
The issue is that if you write code that deals with color you must understand color spaces and gamma. A non-linearly encoded color can't be plugged into any of the math you use to manipulate images and get meaningful results.
Almost all code I come across in the Rust ecosystem (or elsewhere no less) treats color as linear. But color incoming from image files that are not RAW, EXR or some TIF variant is almost /never/ linear.
The reason is that it is written by people who are (often very skilled) software developers but lack any basic understanding of color science.
And then it often takes convicing the maintainers first and the yonx before it is fixed. I'm speaking from multiple experiences here.
For example, the fast image resize crate[3] addressed the resp. issue I filed last Dec.[4] less than a week ago. From the crate being released in the wild to it adding an option to treat color correct almost 1.5 years passed.
This is not the same as forcing crate users to treat color correct btw. The crate added a function that calls a closure but a user who do not understand color science may not grok why this is needed and not use it.
I guess I'm saying there is also often an 'UX' issue that perpetuates the problem to the user side of the API after the crate itself addressed it somehow.
That said, there are some very good crates that abstract the resp. parts away to address the issue. E.g. [5].
[0] http://www.ericbrasseur.org/gamma.html?i=1#explanation
[1] https://silvia-odwyer.github.io/photon/demo.html
[2] https://legacy.imagemagick.org/Usage/resize/#resize_colorspa...
[3] https://docs.rs/fast_image_resize
[4] https://github.com/Cykooz/fast_image_resize/issues/3
[5] https://docs.rs/colstodian
-
Announcing: ImageSieve, a tool to assist in sorting and archiving images and videos
I absolutely loved all the crates available that made my life very simple in many cases. I used (among others) the slint ui framework, kamadak-exif, img_hash, fast_image_resize and rawloader.
- fast_image_resize - crate for fast image resizing with support of SIMD instructions.
portable-simd
- Rust-lang/portable-SIMD: The testing ground for the future of portable SIMD
-
Let's thank who have helped us in the Rust Community together!
Jubilee and Caleb Zulawski for their tireless work on the portable SIMD project. It will land, some day, and when it does it's going to be an amazing boon for the project.
-
Mutually aligned vectors?
The portable SIMD project implements an as_simd() function for slices. The basics are that you get 3 slices and the middle one is a SIMD slice. It allows for fast aligned loads of the data, which could matter if your algorithm is becoming memory bound; it is also a convenient and safe abstraction. In my case, I actually have 2 vectors (say, x and y). I can take them apart using as_simd() like so:
- Code review: deinterlacing a RGBA colour buffer with std::simd
-
Base64 Encoding Performance: Java vs Rust
Rust has generics and monomorphization. You can write the algorithm once and compile for multiple targets. rust-lang/portable-simd
-
Zen4's AVX512 Teardown
This Rust issue [0] was the best short summary of what an SIMD Shuffle is I could find:
„A "shuffle", in SIMD terms, takes a SIMD vector (or possibly two vectors) and a pattern of source lane indexes (usually as an immediate), and then produces a new SIMD vector where the output is the source lane values in the pattern given.“
[0] https://github.com/rust-lang/portable-simd/issues/11
-
possibility of blas natively in Rust
Yet by default it generates code which is only compatible with Pentium4 or newer. In fact lots of serious issues relate to older CPUs and rustc developers plan is to declare them closed when they would be able to drop i686 support (all AMD CPUs which support SSE2 support x86-64, too while Intel situation is mess).
-
Best portable simd library for stable rust?
The standard API crate for portable simd is at https://github.com/rust-lang/portable-simd, but using this requires nightly, which I don't want to do. I'd like to use a crate for simd that works on both x86_64 and wasm in stable rust. wide looks fine for this purpose. Are there any potentially better choices?
-
Any plans for built-in support of Vec2/Vec3/Vec4 in Rust?
See: https://github.com/rust-lang/portable-simd
-
Hey Rustaceans! Got a question? Ask here! (28/2022)!
As for portable SIMD, there's relatively recent activity (last commit 20 days ago) on this repository: https://github.com/rust-lang/portable-simd
What are some alternatives?
async-graphql - A GraphQL server library implemented in Rust
rust-base64 - base64, in rust
rawloader - rust library to extract the raw data and some metadata from digital camera images
faster-hex - fast hex
image-sieve - GUI based tool to sort and categorize images written in Rust
config-rs - ⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
exif-rs - Exif parsing library written in pure Rust
cargo-about - 📜 Cargo plugin to generate list of all licenses for a crate 🦀
watchout - Automatically run scripts and reload images
ulid-rs - This is a Rust implementation of the ulid project
slint - Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
ulid-lite - Generate unique, yet sortable identifiers