1.4.0
zero-dependency JavaScript image manipulation
Attributes
Extremely Popular
Includes Deno configuration
Repository
Current version released
a day ago
ImageScript
zero-dependency JavaScript image manipulation
ImageScript is a zero-dependency alternative to common JavaScript bitmap image manipulation tools. It can achieve much more performant results by utilizing lower-level memory access, less memory copying and WebAssembly / native binaries for decoding and encoding.
Features
- Decoding images
- PNGs (grayscale, RGB, indexed colors) with and without alpha channels
- JPEGs (grayscale, RGB, CMYK)
- TIFFs
- Decoding GIFs
- Rendering SVGs
- Rendering vector fonts
- Image manipulation functions (crop , rotate , composite, …)
- Color manipulation functions (invert , hueShift, …)
- Color information functions (averageColor , dominantColor, …)
- Encoding images as PNGs , JPEGs and GIFs
Example
import {Image} from "jsr:@matmen/imagescript";
const input = await Deno.readFile('./image.png');
const image = await Image.decode(input);
image.rotate(180);
const output = await image.encode();
await Deno.writeFile('./output.png', output);
If you have any additional questions, feel free to join the discord support server.