![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
web-images
Advanced tools
Safe - Fast (and Non Blocking) - Dependency free - MIT License (with no GPL extras) - Image Loading, Resizing, Conversion and Processing
import {Image} from "web-images";
import {basename} from "path";
import * as fs from "fs";
async function load_and_save_fast(path: string): Promise<null> {
// Assume `path` has a file extension set to “jpeg”.
const output_path = `./output/${basename(path, "jpeg")}.png`;
return Image
.open(path)
.then((x: Image) => x.thumbnail({
width: 500,
height: 500
}))
.then((x: Image) => x.save(output_path))
.then((_) => {
console.log("done");
return null;
});
}
async function load_and_save_quality(path: string): Promise<null> {
// Assume `path` has a file extension set to “jpeg”.
const output_path = `./output/${basename(path, "jpeg")}.png`;
return Image
.open(path)
.then((x: Image) => x.resize({
width: 500,
height: 500
}))
.then((x: Image) => x.save(output_path))
.then((_) => {
console.log("done");
return null;
});
}
async function load_only(path: string): Promise<Image> {
return Image
.open(path)
.then((x: Image) => x.resize({
width: 500,
height: 500,
resize_exact: false,
filter_type: "Lanczos3"
}));
}
The bringin of the amazing image
crate to the node.js ecosystem.
While e.g. the Sharp library is licensed under the Apache 2.0 License. It’s a wrapper around libvips
which is LGPLv3
. In contrast, Web Images is self contained and distributable under the MIT license.
Although this may, or may not be significant depending on your specific circumstances.
Or “why undergo the development of Web Images when
libvips
is faster”?
First, buy into Rust and it’s advantages over C/C++ implementations. This should filter out all but native JS libraries. Now with regards to Web Images over e.g. Jimp:
Jimp : ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 80.55 seconds
Web Images : ▇▇ 4.77 seconds
*--------------------------------*
| processing 158 images |
*--------------------------------*
[*]: No annoying system requirements on libvips, ImageMagic and etcetera. There are rust dependencies yet everything is baked into the release binary and requires no further dependencies.
[†]: Bugs are inevitable and furthermore what bridges the JS world with the rust implementation is the low-level NAPI interface. Yet while the picture isn’t perfect, the FFI boundary is rather small in comparison. If you buy into Rust and it’s semantics, this should at the very least be a step in the right direction.
[‡]: See benchmarks here
FAQs
Safe - Fast (and Non Blocking) - Dependency free - MIT License (with no GPL extras) - Image Loading, Resizing, Conversion and Processing
We found that web-images demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.