RepositoryTypeScript
imagescript

imagescript/ImageScript

Pure TypeScript image processing that runs everywhere

687sao
35fork
0issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: jpeg

#1 Repository của tuần

2
TINIX TRENDING·Chủ đề: png

#2 Repository của tuần

2
TINIX TRENDING·Chủ đề: image-manipulation

#2 Repository của tuần

ImageScript: Pure TypeScript image processing that runs everywhere

Documentation Playground

Github Discord Server


ImageScript decodes, edits and encodes images in pure TypeScript: no WebAssembly, no native binaries, no dependencies. It runs in Node.js 22.13+, Deno, Bun, browsers and edge runtimes (Cloudflare Workers, Vercel's Edge Runtime, Deno Deploy), works with both import and require(), and ships with type definitions. Large images are encoded and decoded on several threads wherever the runtime supports workers.

npm install imagescript              # Node.js, Bun and bundlers
deno add jsr:@matmen/imagescript     # Deno

Without a bundler, import it from jsDelivr in the browser:


Example

import { Image } from 'imagescript';
import { readFile, writeFile } from 'node:fs/promises';

const image = await Image.decode(await readFile('input.jpg'));
image.resize(256, Image.RESIZE_AUTO).roundCorners(16);
await writeFile('output.png', await image.encode());

Try ImageScript in the Playground

Example


Features

FormatDecodeEncode
PNG✓✓
JPEG✓✓
WebP✓✓ (lossless and lossy)
AVIF✓✓ (lossless and lossy)
JPEG XL✓✓ (lossless and lossy)
GIF, APNG (animations)✓✓
BMP, QOI, TGA, Netpbm✓✓
TIFF, ICO/CUR, Radiance HDR✓
HDR gain maps (Ultra HDR and iPhone JPEGs, AVIF, JPEG XL)✓✓, kept through edits

Animations can be decoded from GIF, APNG, WebP and JPEG XL, and encoded as GIF, APNG or WebP, all at once or frame by frame. Embedded color profiles (Display P3, Adobe RGB, ...) are converted to sRGB when decoding, so images look the way browsers show them.

The documentation covers the full API. When upgrading from an older major version, see the changelog. bench/ compares ImageScript's speed and file sizes with Jimp, sharp and other libraries.


Credits

ImageScript builds on fflate, libjpeg, pdf.js, font-rs, libwebp, HarfBuzz, dav1d, libavif, libaom, jxl-oxide and libjxl. The TrueType hinting follows FreeType: portions of this software are copyright © 2026 The FreeType Project (www.freetype.org). All rights reserved. See THIRD_PARTY_NOTICES.md for the licenses.


Questions? Join the Discord server.

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryTypeScript
jimp-dev/jimp

Image processing in pure JavaScript for Node.js and the browser, with zero native dependencies.

14.7k
Nov 30, 2026
RepositoryGo
imgproxy/imgproxy

Fast and secure standalone server for resizing, processing, and converting images on the fly

11.2k
Nov 30, 2026
RepositoryPython
thumbor/thumbor

thumbor is an open-source photo thumbnail service by globo.com

10.5k
Nov 30, 2026
RepositoryJavaScript
lovell/sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.

32.9k
Nov 30, 2026
RepositoryObjective-C
SDWebImage/SDWebImage

Asynchronous image downloader with cache support as a UIImageView category

25.6k
Apr 15, 2026
RepositoryC#
SixLabors/ImageSharp

A modern, cross-platform, 2D Graphics library for .NET

8.1k
Dec 1, 2026
RepositoryGo
h2non/imaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing

6.1k
Nov 8, 2025
RepositoryGo
cshum/imagor

Fast, secure image processing server and Go library, using libvips

4.1k
Nov 21, 2026
RepositoryPHP
spatie/image-optimizer

Easily optimize images using PHP

2.9k
Nov 5, 2026