Skip to content

Commit f6bcd0f

Browse files
matmenclaude
andcommitted
README: clearer wording, threads for decoding too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsU2GAqbnFSNaYDBGD1Km2
1 parent f5dd224 commit f6bcd0f

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

‎README.md‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
**ImageScript** decodes, edits and encodes images in pure TypeScript: no WebAssembly, no native binaries, no
1111
dependencies. It runs in Node.js 22.13+, Deno, Bun, browsers and edge runtimes (Cloudflare Workers, Vercel's Edge
12-
Runtime, Deno Deploy), with `import` or `require()`, and includes type definitions. Encoders use worker threads where
13-
the runtime has them and images are large enough to gain from them.
12+
Runtime, Deno Deploy), works with both `import` and `require()`, and ships with type definitions. Large images are
13+
encoded and decoded on several threads wherever the runtime supports workers.
1414

1515
```sh
1616
npm install imagescript # Node.js, Bun and bundlers
@@ -30,8 +30,8 @@ image.resize(256, Image.RESIZE_AUTO).roundCorners(16);
3030
await writeFile('output.png', await image.encode());
3131
```
3232

33-
Coordinates are 0-based, `(0, 0)` is the top left pixel. A bigger example is the
34-
[README image generation](https://github.com/matmen/ImageScript/blob/master/tests/readme.js):
33+
Coordinates start at `(0, 0)`, the top left pixel. For a bigger example, see the
34+
[script that generates this image](https://github.com/matmen/ImageScript/blob/master/tests/readme.js):
3535

3636
[![Example](https://github.com/matmen/ImageScript/raw/master/tests/targets/readme.png)](https://github.com/matmen/ImageScript/blob/master/tests/readme.js)
3737

@@ -50,14 +50,15 @@ Coordinates are 0-based, `(0, 0)` is the top left pixel. A bigger example is the
5050
| BMP, QOI, TGA, Netpbm | ✓ | ✓ |
5151
| TIFF, ICO/CUR, Radiance HDR | ✓ | |
5252

53-
Animated WebPs and JPEG XLs decode too, and [animations](https://imagescript.matmen.dev/classes/Animation.html)
54-
encode as GIF, APNG or WebP, also [a frame at a time](https://imagescript.matmen.dev/classes/Animation.html#webpencoder).
55-
Embedded ICC color profiles (Display P3, Adobe RGB, ...) are converted to sRGB when decoding, like browsers show them.
53+
[Animations](https://imagescript.matmen.dev/classes/Animation.html) can be decoded from GIF, APNG, WebP and JPEG XL,
54+
and encoded as GIF, APNG or WebP, all at once or
55+
[frame by frame](https://imagescript.matmen.dev/classes/Animation.html#webpencoder). Embedded color profiles (Display
56+
P3, Adobe RGB, ...) are converted to sRGB when decoding, so images look the way browsers show them.
5657

57-
- [Text rendering](https://imagescript.matmen.dev/classes/Image.html#rendertext) with TrueType and OpenType fonts,
58-
in every script, with color emoji
59-
- [SVG rendering](https://imagescript.matmen.dev/classes/Image.html#rendersvg), text included (with the fonts you
60-
pass or the SVG embeds)
58+
- [Text rendering](https://imagescript.matmen.dev/classes/Image.html#rendertext) with TrueType and OpenType fonts:
59+
all scripts, color emoji
60+
- [SVG rendering](https://imagescript.matmen.dev/classes/Image.html#rendersvg), including text (with fonts you pass
61+
or fonts embedded in the SVG)
6162
- [Resizing](https://imagescript.matmen.dev/classes/Image.html#resize),
6263
[cropping](https://imagescript.matmen.dev/classes/Image.html#crop),
6364
[rotating](https://imagescript.matmen.dev/classes/Image.html#rotate),
@@ -69,9 +70,9 @@ Embedded ICC color profiles (Display P3, Adobe RGB, ...) are converted to sRGB w
6970
[brightness](https://imagescript.matmen.dev/classes/Image.html#brightness),
7071
[hueShift](https://imagescript.matmen.dev/classes/Image.html#hueshift), ...
7172

72-
See the [documentation](https://imagescript.matmen.dev/) for everything else, and the
73-
[changelog](https://github.com/matmen/ImageScript/blob/master/CHANGELOG.md) when upgrading from an older major version.
74-
[bench/](bench/README.md) compares ImageScript to Jimp, sharp and others.
73+
The [documentation](https://imagescript.matmen.dev/) covers the full API. When upgrading from an older major version,
74+
see the [changelog](https://github.com/matmen/ImageScript/blob/master/CHANGELOG.md). [bench/](bench/README.md)
75+
compares ImageScript's speed and file sizes with Jimp, sharp and other libraries.
7576

7677
---
7778

0 commit comments

Comments
 (0)