@theresav/graphics 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -73
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
# TheresaV Graphics (`@theresav/graphics`)
|
|
2
2
|
|
|
3
|
-
Unified, ultra-high-performance, security-hardened 2D graphics engine written in Rust for **Node.js** and **Bun**.
|
|
3
|
+
Unified, ultra-high-performance, security-hardened 2D graphics engine written in pure Rust for **Node.js** and **Bun**.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
TheresaV Graphics unifies the capabilities of **Jimp** (fluent, intuitive image manipulation), **Sharp** (high-throughput parallel image processing), and **HTML5 Canvas 2D** (software vector rasterization & typography) into **one cohesive Rust core** and **one public package**.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@theresav/graphics)
|
|
8
|
-
[](https://github.com/
|
|
8
|
+
[](https://github.com/Blckrose08/theresav-graphics)
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Key Features
|
|
13
13
|
|
|
14
|
-
- ⚡ **
|
|
15
|
-
- 🛡️ **
|
|
16
|
-
- 🎨 **Canvas 2D Rendering**:
|
|
17
|
-
- 🖼️ **
|
|
18
|
-
- 📦 **
|
|
19
|
-
- 🎬 **
|
|
20
|
-
-
|
|
21
|
-
- 🌐 **Node.js & Bun Native**: Berjalan native tanpa layer emulasi atau dependensi C++.
|
|
14
|
+
- ⚡ **High Throughput**: Multi-core row parallelization powered by Rayon, SIMD-aligned contiguous memory streaming, and Link-Time Optimization (LTO).
|
|
15
|
+
- 🛡️ **Enterprise Security**: Decompression bomb mitigation, RAII deterministic memory quotas, magic byte validation, and a strict SVG sandbox rejecting scripts and external entities.
|
|
16
|
+
- 🎨 **Full Canvas 2D Rendering**: Complete software Canvas 2D API (Paths, Bézier curves, arcs, linear & radial gradients, alpha compositing, software anti-aliasing scanline rasterizer, and TTF/OTF typography).
|
|
17
|
+
- 🖼️ **Fluent Image Pipeline**: Resize (Bilinear, Nearest, Lanczos3), Crop, Rotate, Flip, Flop, Blur (Gaussian), Sharpen (Unsharp Mask), Color Adjustments, Tint, Invert, Posterize, and Pixelate.
|
|
18
|
+
- 📦 **Unified Codecs**: Native support for PNG, JPEG, WebP, BMP, TIFF, GIF, and SVG rendering.
|
|
19
|
+
- 🎬 **Animation Engine**: Multi-frame animated GIF decoding and encoding with frame quota enforcement.
|
|
20
|
+
- 🌐 **Node.js & Bun Native**: Zero C++ dependencies, 100% safe Rust where possible, cross-runtime compatibility across Node.js and Bun.
|
|
22
21
|
|
|
23
22
|
---
|
|
24
23
|
|
|
25
|
-
##
|
|
24
|
+
## Installation
|
|
26
25
|
|
|
27
26
|
```bash
|
|
28
|
-
#
|
|
27
|
+
# Using Bun
|
|
29
28
|
bun add @theresav/graphics
|
|
30
29
|
|
|
31
|
-
#
|
|
30
|
+
# Using npm
|
|
32
31
|
npm install @theresav/graphics
|
|
33
32
|
|
|
34
|
-
#
|
|
33
|
+
# Using pnpm or yarn
|
|
35
34
|
pnpm add @theresav/graphics
|
|
36
35
|
yarn add @theresav/graphics
|
|
37
36
|
```
|
|
38
37
|
|
|
39
38
|
---
|
|
40
39
|
|
|
41
|
-
##
|
|
40
|
+
## Quick Start & Code Examples
|
|
42
41
|
|
|
43
|
-
### 1. Image Processing Pipeline
|
|
42
|
+
### 1. Fluent Image Processing Pipeline
|
|
44
43
|
|
|
45
44
|
```typescript
|
|
46
45
|
import { Graphics } from "@theresav/graphics";
|
|
47
46
|
|
|
48
|
-
//
|
|
47
|
+
// Open an image from file or Buffer
|
|
49
48
|
const image = await Graphics.open("./input.png");
|
|
50
|
-
//
|
|
49
|
+
// Or from memory: const image = await Graphics.fromBuffer(buffer);
|
|
51
50
|
|
|
52
|
-
//
|
|
51
|
+
// Fluent processing pipeline
|
|
53
52
|
const outputBuffer = await image
|
|
54
53
|
.resize(1200, 630)
|
|
55
54
|
.grayscale()
|
|
@@ -58,7 +57,7 @@ const outputBuffer = await image
|
|
|
58
57
|
.sharpen(1.0, 1.5)
|
|
59
58
|
.toBuffer("webp", { quality: 85 });
|
|
60
59
|
|
|
61
|
-
//
|
|
60
|
+
// Save directly to file
|
|
62
61
|
await image.toFile("./output.webp", "webp", { quality: 85 });
|
|
63
62
|
```
|
|
64
63
|
|
|
@@ -70,20 +69,20 @@ await image.toFile("./output.webp", "webp", { quality: 85 });
|
|
|
70
69
|
import { Graphics } from "@theresav/graphics";
|
|
71
70
|
import fs from "fs";
|
|
72
71
|
|
|
73
|
-
//
|
|
72
|
+
// Create an 800 x 600 Canvas
|
|
74
73
|
const canvas = Graphics.createCanvas(800, 600);
|
|
75
74
|
const ctx = canvas.getContext("2d");
|
|
76
75
|
|
|
77
|
-
//
|
|
76
|
+
// Draw solid background
|
|
78
77
|
ctx.fillStyle = "#1e1e2e";
|
|
79
78
|
ctx.fillRect(0, 0, 800, 600);
|
|
80
79
|
|
|
81
|
-
//
|
|
80
|
+
// Create Linear Gradient
|
|
82
81
|
const gradient = ctx.createLinearGradient(100, 100, 400, 400);
|
|
83
82
|
gradient.addColorStop(0, "#ff5555");
|
|
84
83
|
gradient.addColorStop(1, "#50fa7b");
|
|
85
84
|
|
|
86
|
-
//
|
|
85
|
+
// Draw closed vector paths & Bézier curves
|
|
87
86
|
ctx.beginPath();
|
|
88
87
|
ctx.moveTo(100, 100);
|
|
89
88
|
ctx.bezierCurveTo(200, 50, 300, 250, 400, 150);
|
|
@@ -92,24 +91,24 @@ ctx.closePath();
|
|
|
92
91
|
ctx.fillStyle = gradient;
|
|
93
92
|
ctx.fill();
|
|
94
93
|
|
|
95
|
-
//
|
|
94
|
+
// Draw circle (Arc)
|
|
96
95
|
ctx.beginPath();
|
|
97
96
|
ctx.arc(600, 300, 80, 0, Math.PI * 2);
|
|
98
97
|
ctx.fillStyle = "#8be9fd";
|
|
99
98
|
ctx.fill();
|
|
100
99
|
|
|
101
|
-
//
|
|
100
|
+
// Draw text with TrueType/OpenType typography
|
|
102
101
|
ctx.fillStyle = "#ffffff";
|
|
103
102
|
ctx.fillText("TheresaV Graphics Engine", 50, 520);
|
|
104
103
|
|
|
105
|
-
//
|
|
104
|
+
// Export to buffer
|
|
106
105
|
const pngBuffer = await canvas.toBuffer("png");
|
|
107
106
|
fs.writeFileSync("./canvas_output.png", pngBuffer);
|
|
108
107
|
```
|
|
109
108
|
|
|
110
109
|
---
|
|
111
110
|
|
|
112
|
-
### 3.
|
|
111
|
+
### 3. Image Compositing & Watermarking
|
|
113
112
|
|
|
114
113
|
```typescript
|
|
115
114
|
import { Graphics } from "@theresav/graphics";
|
|
@@ -117,35 +116,19 @@ import { Graphics } from "@theresav/graphics";
|
|
|
117
116
|
const baseImage = await Graphics.open("./background.jpg");
|
|
118
117
|
const watermark = await Graphics.open("./logo.png");
|
|
119
118
|
|
|
120
|
-
//
|
|
119
|
+
// Resize watermark and composite onto bottom right corner
|
|
121
120
|
watermark.resize(150, 150);
|
|
122
121
|
const posX = baseImage.width - watermark.width - 20;
|
|
123
122
|
const posY = baseImage.height - watermark.height - 20;
|
|
124
123
|
|
|
125
|
-
baseImage.composite(watermark, posX, posY, 0.85); //
|
|
124
|
+
baseImage.composite(watermark, posX, posY, 0.85); // 85% opacity
|
|
126
125
|
|
|
127
126
|
await baseImage.toFile("./watermarked.jpg", "jpeg", { quality: 90 });
|
|
128
127
|
```
|
|
129
128
|
|
|
130
129
|
---
|
|
131
130
|
|
|
132
|
-
### 4.
|
|
133
|
-
|
|
134
|
-
Untuk proyek yang sudah menggunakan pustaka `sharp`, Anda dapat mengimpor fungsi `sharp` langsung dari `@theresav/graphics`:
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
import { sharp } from "@theresav/graphics";
|
|
138
|
-
|
|
139
|
-
const output = await sharp(inputBuffer)
|
|
140
|
-
.rotate(90)
|
|
141
|
-
.resize(512, 512, { fit: "contain", background: { r: 0, g: 0, b: 0, alpha: 0 } })
|
|
142
|
-
.webp({ quality: 82 })
|
|
143
|
-
.toBuffer();
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
### 5. Render SVG ke Raster Citra
|
|
131
|
+
### 4. Secure SVG Rendering
|
|
149
132
|
|
|
150
133
|
```typescript
|
|
151
134
|
import { Graphics } from "@theresav/graphics";
|
|
@@ -157,51 +140,51 @@ const svgString = `
|
|
|
157
140
|
</svg>
|
|
158
141
|
`;
|
|
159
142
|
|
|
160
|
-
//
|
|
143
|
+
// Strict mode: external entity resolution and scripts are rejected
|
|
161
144
|
const renderedBuffer = await Graphics.renderSvg(svgString);
|
|
162
145
|
```
|
|
163
146
|
|
|
164
147
|
---
|
|
165
148
|
|
|
166
|
-
###
|
|
149
|
+
### 5. Animated GIF Creation
|
|
167
150
|
|
|
168
151
|
```typescript
|
|
169
152
|
import { Graphics } from "@theresav/graphics";
|
|
170
153
|
|
|
171
|
-
//
|
|
154
|
+
// Prepare frame buffers
|
|
172
155
|
const frame1 = await Graphics.open("./frame1.png").then(img => img.toBuffer("png"));
|
|
173
156
|
const frame2 = await Graphics.open("./frame2.png").then(img => img.toBuffer("png"));
|
|
174
157
|
|
|
175
158
|
const gifBuffer = await Graphics.createAnimatedGif(
|
|
176
159
|
[frame1, frame2],
|
|
177
|
-
200, // delay
|
|
178
|
-
500, //
|
|
179
|
-
500 //
|
|
160
|
+
200, // delay between frames in milliseconds (200ms)
|
|
161
|
+
500, // width
|
|
162
|
+
500 // height
|
|
180
163
|
);
|
|
181
164
|
```
|
|
182
165
|
|
|
183
166
|
---
|
|
184
167
|
|
|
185
|
-
###
|
|
168
|
+
### 6. Security Profiles & Memory Quotas
|
|
186
169
|
|
|
187
|
-
TheresaV Graphics
|
|
170
|
+
TheresaV Graphics provides three built-in kernel-level security profiles:
|
|
188
171
|
|
|
189
172
|
```typescript
|
|
190
173
|
import { Graphics } from "@theresav/graphics";
|
|
191
174
|
|
|
192
|
-
// 1. Standard:
|
|
175
|
+
// 1. Standard: For local trusted applications
|
|
193
176
|
const standardEngine = new Graphics({ security: "standard" });
|
|
194
177
|
|
|
195
|
-
// 2. Strict:
|
|
178
|
+
// 2. Strict: For public APIs and user uploads
|
|
196
179
|
const strictEngine = new Graphics({
|
|
197
180
|
security: "strict",
|
|
198
|
-
memoryLimit: 128 * 1024 * 1024 //
|
|
181
|
+
memoryLimit: 128 * 1024 * 1024 // 128MB maximum allocation quota
|
|
199
182
|
});
|
|
200
183
|
|
|
201
|
-
// 3. Hardened:
|
|
184
|
+
// 3. Hardened: For untrusted files and multi-tenant environments
|
|
202
185
|
const hardenedEngine = new Graphics({
|
|
203
186
|
security: "hardened",
|
|
204
|
-
memoryLimit: 64 * 1024 * 1024
|
|
187
|
+
memoryLimit: 64 * 1024 * 1024 // 64MB tight limit
|
|
205
188
|
});
|
|
206
189
|
|
|
207
190
|
const safeImage = await strictEngine.fromBuffer(untrustedUploadBuffer);
|
|
@@ -209,21 +192,21 @@ const safeImage = await strictEngine.fromBuffer(untrustedUploadBuffer);
|
|
|
209
192
|
|
|
210
193
|
---
|
|
211
194
|
|
|
212
|
-
##
|
|
195
|
+
## Performance Benchmarks
|
|
213
196
|
|
|
214
|
-
*
|
|
197
|
+
*Benchmarked on Linux x86_64, Node.js v26.13.0, 500x500 RGBA8 test image, 800x600 Canvas (50 iterations).*
|
|
215
198
|
|
|
216
|
-
|
|
|
199
|
+
| Operation | TheresaV Graphics (Rust) | Sharp (libvips C/C++) | Jimp (Pure JavaScript) | TheresaV Advantage |
|
|
217
200
|
|:---|:---|:---|:---|:---|
|
|
218
|
-
| **Canvas 2D Rendering** | **1,076.4 op/s** (0.93 ms) | N/A | N/A | **14.6x
|
|
219
|
-
| **Gaussian Blur** | **183.3 op/s** (5.46 ms) | 152.7 op/s (6.55 ms) | 15.7 op/s (63.89 ms) | **1.2x
|
|
220
|
-
| **Sharpen** | **180.5 op/s** (5.54 ms) | 95.1 op/s (10.52 ms) | N/A | **1.9x
|
|
221
|
-
| **Resize** | **468.9 op/s** (2.13 ms) | 186.9 op/s (5.35 ms) | 151.0 op/s (6.62 ms) | **2.5x
|
|
222
|
-
| **Crop** | **2,524.5 op/s** (0.40 ms) | 710.8 op/s (1.41 ms) | 466.6 op/s (2.14 ms) | **3.5x
|
|
223
|
-
| **PNG Codec Pipeline** | **1,110.8 op/s** (0.90 ms) | 460.4 op/s (2.17 ms) | 218.8 op/s (4.57 ms) | **2.4x
|
|
201
|
+
| **Canvas 2D Rendering** | **1,076.4 op/s** (0.93 ms) | N/A | N/A | **14.6x Faster than @napi-rs/canvas** (73.5 op/s) |
|
|
202
|
+
| **Gaussian Blur** | **183.3 op/s** (5.46 ms) | 152.7 op/s (6.55 ms) | 15.7 op/s (63.89 ms) | **1.2x Faster than Sharp** (11.7x faster than Jimp) |
|
|
203
|
+
| **Sharpen** | **180.5 op/s** (5.54 ms) | 95.1 op/s (10.52 ms) | N/A | **1.9x Faster than Sharp** |
|
|
204
|
+
| **Resize** | **468.9 op/s** (2.13 ms) | 186.9 op/s (5.35 ms) | 151.0 op/s (6.62 ms) | **2.5x Faster than Sharp** (3.1x faster than Jimp) |
|
|
205
|
+
| **Crop** | **2,524.5 op/s** (0.40 ms) | 710.8 op/s (1.41 ms) | 466.6 op/s (2.14 ms) | **3.5x Faster than Sharp** (5.4x faster than Jimp) |
|
|
206
|
+
| **PNG Codec Pipeline** | **1,110.8 op/s** (0.90 ms) | 460.4 op/s (2.17 ms) | 218.8 op/s (4.57 ms) | **2.4x Faster than Sharp** (5.1x faster than Jimp) |
|
|
224
207
|
|
|
225
208
|
---
|
|
226
209
|
|
|
227
|
-
##
|
|
210
|
+
## License
|
|
228
211
|
|
|
229
|
-
|
|
212
|
+
Distributed under the **MIT OR Apache-2.0** license.
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export declare class Graphics {
|
|
|
16
16
|
}
|
|
17
17
|
export { Image } from "./image.js";
|
|
18
18
|
export { Canvas, CanvasRenderingContext2D } from "./canvas.js";
|
|
19
|
-
export { sharp, SharpPipeline } from "./sharp.js";
|
|
20
19
|
export * from "./types.js";
|
|
21
20
|
export default Graphics;
|
|
22
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAM;IAEtB,YAAY,OAAO,CAAC,EAAE,eAAe,EAKpC;IAED,OAAa,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAG9C;IAED,OAAa,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAGtD;IAED,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGzD;IAED,OAAa,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnD;IAED,OAAa,iBAAiB,CAC5B,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAEjB;IAEK,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAGvC;IAEK,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KA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G/C;IAED,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGlD;IAEK,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE5C;CACF;AAED,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC/D,cAAc,YAAY,CAAC;eACZ,QAAQ"}
|
package/dist/index.js
CHANGED
|
@@ -42,7 +42,6 @@ export class Graphics {
|
|
|
42
42
|
}
|
|
43
43
|
export { Image } from "./image.js";
|
|
44
44
|
export { Canvas, CanvasRenderingContext2D } from "./canvas.js";
|
|
45
|
-
export { sharp, SharpPipeline } from "./sharp.js";
|
|
46
45
|
export * from "./types.js";
|
|
47
46
|
export default Graphics;
|
|
48
47
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,MAAM,OAAO,QAAQ;IACX,QAAQ,CAAM;IAEtB,YAAY,OAAyB;QACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAC5C,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,WAAW,CACrB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAY;QAC5B,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACtD,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,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K,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC/D,cAAc,YAAY,CAAC;AAC3B,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theresav/graphics",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Unified high-performance 2D graphics engine in Rust for Node.js and Bun",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/
|
|
21
|
+
"url": "https://github.com/Blckrose08/theresav-graphics.git"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"graphics",
|