imagescript 3.2.1 → 3.4.0
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 +35 -10
- package/THIRD_PARTY_NOTICES.md +298 -2
- package/dist/animation.d.ts +25 -8
- package/dist/animation.js +44 -13
- package/dist/codecs/av1/cdef.js +197 -0
- package/dist/codecs/av1/data.js +141 -0
- package/dist/codecs/av1/decode.js +1769 -0
- package/dist/codecs/av1/filmgrain.js +219 -0
- package/dist/codecs/av1/frame.js +114 -0
- package/dist/codecs/av1/ipred.js +491 -0
- package/dist/codecs/av1/itx.js +950 -0
- package/dist/codecs/av1/loopfilter.js +149 -0
- package/dist/codecs/av1/msac.js +161 -0
- package/dist/codecs/av1/obu.js +516 -0
- package/dist/codecs/av1/postfilter.js +28 -0
- package/dist/codecs/av1/restoration.js +193 -0
- package/dist/codecs/av1/tables.js +160 -0
- package/dist/codecs/avif.js +581 -0
- package/dist/codecs/bmp.js +317 -0
- package/dist/codecs/crc.js +5 -0
- package/dist/codecs/gif.js +10 -35
- package/dist/codecs/hdr.d.ts +25 -0
- package/dist/codecs/hdr.js +201 -0
- package/dist/codecs/ico.js +48 -0
- package/dist/codecs/jpeg.js +11 -28
- package/dist/codecs/jxl/bits.js +126 -0
- package/dist/codecs/jxl/blend.js +117 -0
- package/dist/codecs/jxl/color.js +116 -0
- package/dist/codecs/jxl/dct.js +404 -0
- package/dist/codecs/jxl/entropy.js +556 -0
- package/dist/codecs/jxl/features.js +325 -0
- package/dist/codecs/jxl/filters.js +119 -0
- package/dist/codecs/jxl/frame-header.js +195 -0
- package/dist/codecs/jxl/frame.js +319 -0
- package/dist/codecs/jxl/headers.js +249 -0
- package/dist/codecs/jxl/idct.js +484 -0
- package/dist/codecs/jxl/modular.js +688 -0
- package/dist/codecs/jxl/quant.js +219 -0
- package/dist/codecs/jxl/upsample.js +52 -0
- package/dist/codecs/jxl/vardct.js +472 -0
- package/dist/codecs/jxl.js +89 -0
- package/dist/codecs/netpbm.js +239 -0
- package/dist/codecs/png.js +22 -10
- package/dist/codecs/qoi.js +150 -0
- package/dist/codecs/tga.js +3 -1
- package/dist/codecs/tiff.js +7 -2
- package/dist/codecs/vp8-enc-dsp.js +932 -0
- package/dist/codecs/vp8-enc-tables.js +78 -0
- package/dist/codecs/vp8-enc.js +1930 -0
- package/dist/codecs/vp8.js +3 -1
- package/dist/codecs/vp8l.js +126 -58
- package/dist/codecs/webp.js +47 -11
- package/dist/codecs/zlib.js +81 -69
- package/dist/frame.d.ts +1 -0
- package/dist/frame.js +4 -2
- package/dist/gif.d.ts +1 -0
- package/dist/gif.js +2 -2
- package/dist/image-type.d.ts +15 -1
- package/dist/image-type.js +45 -2
- package/dist/image.d.ts +89 -13
- package/dist/image.js +266 -113
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -4
- package/dist/render/bidi.js +350 -0
- package/dist/render/buffer.js +362 -0
- package/dist/render/color.js +164 -0
- package/dist/render/colr.js +523 -0
- package/dist/render/font.js +173 -241
- package/dist/render/hinting.js +38 -22
- package/dist/render/layout.js +1553 -0
- package/dist/render/linebreak.js +210 -0
- package/dist/render/segment.js +106 -0
- package/dist/render/shape.js +984 -0
- package/dist/render/shapers/arabic.js +284 -0
- package/dist/render/shapers/hangul.js +142 -0
- package/dist/render/shapers/hebrew.js +49 -0
- package/dist/render/shapers/index.js +52 -0
- package/dist/render/shapers/indic.js +579 -0
- package/dist/render/shapers/khmer.js +104 -0
- package/dist/render/shapers/machine.js +129 -0
- package/dist/render/shapers/myanmar.js +121 -0
- package/dist/render/shapers/syllabic.js +100 -0
- package/dist/render/shapers/thai.js +125 -0
- package/dist/render/shapers/use.js +235 -0
- package/dist/render/svg.js +102 -23
- package/dist/render/text.js +373 -103
- package/dist/render/unicode-data.js +63 -0
- package/dist/render/unicode.js +50 -0
- package/dist/text-layout.d.ts +4 -1
- package/dist/text-layout.js +2 -2
- package/dist/util/alpha.js +43 -0
- package/dist/util/blur.js +20 -33
- package/dist/util/bytes.js +40 -0
- package/dist/util/limits.js +34 -0
- package/dist/util/options.js +7 -0
- package/dist/util/resample.js +126 -7
- package/dist/util/rotate.js +43 -0
- package/dist/version.js +1 -1
- package/licenses/HarfBuzz.txt +42 -0
- package/licenses/Unicode-3.0.txt +39 -0
- package/package.json +25 -2
package/dist/util/resample.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The filter coefficients and the box, bilinear and bicubic filters are translated from Pillow's
|
|
3
|
+
* src/libImaging/Resample.c (precompute_coeffs, box_filter, bilinear_filter, bicubic_filter). Copyright © 1997-2011 by
|
|
4
|
+
* Secret Labs AB, © 1995-2011 by Fredrik Lundh and contributors, © 2010 by Jeffrey 'Alex' Clark and contributors,
|
|
5
|
+
* MIT-CMU License (see THIRD_PARTY_NOTICES.md)
|
|
6
|
+
*/
|
|
7
|
+
import { littleEndian, isOpaque, premultiply8, unpremultiply8 } from "./alpha.js";
|
|
1
8
|
export const BOX = { support: 0.5, weight: x => x >= -0.5 && x < 0.5 ? 1 : 0 };
|
|
2
9
|
export const TRIANGLE = { support: 1, weight: x => Math.max(0, 1 - Math.abs(x)) };
|
|
3
10
|
export const CUBIC = {
|
|
@@ -14,7 +21,7 @@ export const CUBIC = {
|
|
|
14
21
|
};
|
|
15
22
|
const BITS = 14;
|
|
16
23
|
const ONE = 1 << BITS;
|
|
17
|
-
function coefficients(inSize, outSize, filter, bits) {
|
|
24
|
+
function coefficients(inSize, outSize, filter, bits, pad = false) {
|
|
18
25
|
const scale = inSize / outSize;
|
|
19
26
|
const filterScale = Math.max(1, scale);
|
|
20
27
|
const support = filter.support * filterScale;
|
|
@@ -27,6 +34,8 @@ function coefficients(inSize, outSize, filter, bits) {
|
|
|
27
34
|
maxs[i] = Math.min(inSize, Math.floor(center + support + 0.5));
|
|
28
35
|
taps = Math.max(taps, maxs[i] - mins[i]);
|
|
29
36
|
}
|
|
37
|
+
if (pad)
|
|
38
|
+
taps = Math.min(inSize, taps <= 2 ? 2 : taps <= 4 ? 4 : taps);
|
|
30
39
|
const start = new Int32Array(outSize);
|
|
31
40
|
const weights = new Int32Array(outSize * taps);
|
|
32
41
|
const w = new Float64Array(taps);
|
|
@@ -48,10 +57,14 @@ function coefficients(inSize, outSize, filter, bits) {
|
|
|
48
57
|
}
|
|
49
58
|
return { start, weights, taps };
|
|
50
59
|
}
|
|
51
|
-
const
|
|
52
|
-
export function resample(src, width, height, outWidth, outHeight, filter, out) {
|
|
53
|
-
if (littleEndian && filter.support <= 1
|
|
54
|
-
|
|
60
|
+
const FAST_TAPS = 4;
|
|
61
|
+
export function resample(src, width, height, outWidth, outHeight, filter, out, fast = false) {
|
|
62
|
+
if (littleEndian && filter.support <= 1) {
|
|
63
|
+
if (fast && resampleFast(src, width, height, outWidth, outHeight, filter, out))
|
|
64
|
+
return;
|
|
65
|
+
if (resampleOpaque(src, width, height, outWidth, outHeight, filter, out))
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
55
68
|
resamplePremultiplied(src, width, height, outWidth, outHeight, filter, out);
|
|
56
69
|
}
|
|
57
70
|
function resampleOpaque(src, width, height, outWidth, outHeight, filter, out) {
|
|
@@ -179,7 +192,8 @@ function resampleOpaque(src, width, height, outWidth, outHeight, filter, out) {
|
|
|
179
192
|
}
|
|
180
193
|
else {
|
|
181
194
|
for (let x = 0; x < outWidth; x++, o++) {
|
|
182
|
-
let r = 0, g = 0, b = 0, k = 0, s = row + start[x] * 2
|
|
195
|
+
let r = 0, g = 0, b = 0, k = 0, s = row + start[x] * 2;
|
|
196
|
+
const w = x * taps;
|
|
183
197
|
for (; k + 1 < taps; k += 2, s += 4) {
|
|
184
198
|
const a0 = lanes[s], a1 = lanes[s + 2], w0 = weights[w + k], w1 = weights[w + k + 1];
|
|
185
199
|
r += (a0 & 0xffff) * w0 + (a1 & 0xffff) * w1;
|
|
@@ -198,6 +212,110 @@ function resampleOpaque(src, width, height, outWidth, outHeight, filter, out) {
|
|
|
198
212
|
}
|
|
199
213
|
return true;
|
|
200
214
|
}
|
|
215
|
+
function packedSum(pixels, s, step, weights, w, taps) {
|
|
216
|
+
let rb = 0x800080, ga = 0x800080;
|
|
217
|
+
for (let k = 0; k < taps; k++, s += step) {
|
|
218
|
+
const p = pixels[s], wk = weights[w + k];
|
|
219
|
+
rb += Math.imul(p & 0xff00ff, wk);
|
|
220
|
+
ga += Math.imul(p >>> 8 & 0xff00ff, wk);
|
|
221
|
+
}
|
|
222
|
+
return (rb >>> 8 & 0xff00ff) | (ga & 0xff00ff00);
|
|
223
|
+
}
|
|
224
|
+
function verticalFast(pixels, rows, width, outHeight, { start, weights, taps }) {
|
|
225
|
+
let all = -1;
|
|
226
|
+
for (let y = 0, o = 0; y < outHeight; y++) {
|
|
227
|
+
const w = y * taps, r0 = start[y] * width;
|
|
228
|
+
if (taps === 4) {
|
|
229
|
+
const w0 = weights[w], w1 = weights[w + 1], w2 = weights[w + 2], w3 = weights[w + 3];
|
|
230
|
+
const r1 = r0 + width, r2 = r1 + width, r3 = r2 + width;
|
|
231
|
+
for (let x = 0; x < width; x++, o++) {
|
|
232
|
+
const p0 = pixels[r0 + x], p1 = pixels[r1 + x], p2 = pixels[r2 + x], p3 = pixels[r3 + x];
|
|
233
|
+
all &= p0 & p1 & p2 & p3;
|
|
234
|
+
const rb = Math.imul(p0 & 0xff00ff, w0) + Math.imul(p1 & 0xff00ff, w1) + Math.imul(p2 & 0xff00ff, w2) + Math.imul(p3 & 0xff00ff, w3) + 0x800080;
|
|
235
|
+
const ga = Math.imul(p0 >>> 8 & 0xff00ff, w0) + Math.imul(p1 >>> 8 & 0xff00ff, w1) + Math.imul(p2 >>> 8 & 0xff00ff, w2) + Math.imul(p3 >>> 8 & 0xff00ff, w3) + 0x800080;
|
|
236
|
+
rows[o] = (rb >>> 8 & 0xff00ff) | (ga & 0xff00ff00);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
else if (taps === 2) {
|
|
240
|
+
const w0 = weights[w], w1 = weights[w + 1], r1 = r0 + width;
|
|
241
|
+
for (let x = 0; x < width; x++, o++) {
|
|
242
|
+
const p0 = pixels[r0 + x], p1 = pixels[r1 + x];
|
|
243
|
+
all &= p0 & p1;
|
|
244
|
+
const rb = Math.imul(p0 & 0xff00ff, w0) + Math.imul(p1 & 0xff00ff, w1) + 0x800080;
|
|
245
|
+
const ga = Math.imul(p0 >>> 8 & 0xff00ff, w0) + Math.imul(p1 >>> 8 & 0xff00ff, w1) + 0x800080;
|
|
246
|
+
rows[o] = (rb >>> 8 & 0xff00ff) | (ga & 0xff00ff00);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
for (let x = 0; x < width; x++, o++) {
|
|
251
|
+
for (let k = 0, s = r0 + x; k < taps; k++, s += width)
|
|
252
|
+
all &= pixels[s];
|
|
253
|
+
rows[o] = packedSum(pixels, r0 + x, width, weights, w, taps);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return all;
|
|
258
|
+
}
|
|
259
|
+
function horizontalFast(rows, result, width, outWidth, outHeight, { start, weights, taps }) {
|
|
260
|
+
for (let y = 0, o = 0; y < outHeight; y++) {
|
|
261
|
+
const row = y * width;
|
|
262
|
+
if (taps === 4) {
|
|
263
|
+
for (let x = 0; x < outWidth; x++, o++) {
|
|
264
|
+
const s = row + start[x], w = x * 4;
|
|
265
|
+
const p0 = rows[s], p1 = rows[s + 1], p2 = rows[s + 2], p3 = rows[s + 3];
|
|
266
|
+
const w0 = weights[w], w1 = weights[w + 1], w2 = weights[w + 2], w3 = weights[w + 3];
|
|
267
|
+
const rb = Math.imul(p0 & 0xff00ff, w0) + Math.imul(p1 & 0xff00ff, w1) + Math.imul(p2 & 0xff00ff, w2) + Math.imul(p3 & 0xff00ff, w3) + 0x800080;
|
|
268
|
+
const ga = Math.imul(p0 >>> 8 & 0xff00ff, w0) + Math.imul(p1 >>> 8 & 0xff00ff, w1) + Math.imul(p2 >>> 8 & 0xff00ff, w2) + Math.imul(p3 >>> 8 & 0xff00ff, w3) + 0x800080;
|
|
269
|
+
result[o] = (rb >>> 8 & 0xff00ff) | (ga & 0xff00ff00);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
else if (taps === 2) {
|
|
273
|
+
for (let x = 0; x < outWidth; x++, o++) {
|
|
274
|
+
const s = row + start[x], w = x * 2;
|
|
275
|
+
const p0 = rows[s], p1 = rows[s + 1], w0 = weights[w], w1 = weights[w + 1];
|
|
276
|
+
const rb = Math.imul(p0 & 0xff00ff, w0) + Math.imul(p1 & 0xff00ff, w1) + 0x800080;
|
|
277
|
+
const ga = Math.imul(p0 >>> 8 & 0xff00ff, w0) + Math.imul(p1 >>> 8 & 0xff00ff, w1) + 0x800080;
|
|
278
|
+
result[o] = (rb >>> 8 & 0xff00ff) | (ga & 0xff00ff00);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
for (let x = 0; x < outWidth; x++, o++)
|
|
283
|
+
result[o] = packedSum(rows, row + start[x], 1, weights, x * taps, taps);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
function resampleFast(src, width, height, outWidth, outHeight, filter, out) {
|
|
288
|
+
const vertical = coefficients(height, outHeight, filter, 8, true), horizontal = coefficients(width, outWidth, filter, 8, true);
|
|
289
|
+
if (vertical.taps > FAST_TAPS || horizontal.taps > FAST_TAPS)
|
|
290
|
+
return false;
|
|
291
|
+
let pixels = new Int32Array(src.buffer, src.byteOffset, width * height), all = -1;
|
|
292
|
+
for (let x = 0, last = (height - 1) * width; x < width; x++)
|
|
293
|
+
all &= pixels[x] & pixels[last + x];
|
|
294
|
+
let opaque = all >>> 24 === 255 && (outHeight !== height || isOpaque(src));
|
|
295
|
+
const premultiplied = () => {
|
|
296
|
+
const bitmap = new Uint8ClampedArray(src.length);
|
|
297
|
+
premultiply8(src, bitmap);
|
|
298
|
+
return new Int32Array(bitmap.buffer);
|
|
299
|
+
};
|
|
300
|
+
if (!opaque)
|
|
301
|
+
pixels = premultiplied();
|
|
302
|
+
let rows = pixels;
|
|
303
|
+
if (outHeight !== height) {
|
|
304
|
+
rows = new Int32Array(width * outHeight);
|
|
305
|
+
if (verticalFast(pixels, rows, width, outHeight, vertical) >>> 24 !== 255 && opaque) {
|
|
306
|
+
opaque = false;
|
|
307
|
+
verticalFast(premultiplied(), rows, width, outHeight, vertical);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
const result = new Int32Array(out.buffer, out.byteOffset, outWidth * outHeight);
|
|
311
|
+
if (outWidth === width)
|
|
312
|
+
result.set(rows);
|
|
313
|
+
else
|
|
314
|
+
horizontalFast(rows, result, width, outWidth, outHeight, horizontal);
|
|
315
|
+
if (!opaque)
|
|
316
|
+
unpremultiply8(out);
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
201
319
|
function resamplePremultiplied(src, width, height, outWidth, outHeight, filter, out) {
|
|
202
320
|
const plane = new Int32Array(width * outHeight * 4);
|
|
203
321
|
if (outHeight === height) {
|
|
@@ -250,7 +368,8 @@ function resamplePremultiplied(src, width, height, outWidth, outHeight, filter,
|
|
|
250
368
|
a = plane[s + 3] * ONE;
|
|
251
369
|
}
|
|
252
370
|
else {
|
|
253
|
-
let k = 0, s = row + start[x] * 4
|
|
371
|
+
let k = 0, s = row + start[x] * 4;
|
|
372
|
+
const w = x * taps;
|
|
254
373
|
for (; k + 1 < taps; k += 2, s += 8) {
|
|
255
374
|
const w0 = weights[w + k], w1 = weights[w + k + 1];
|
|
256
375
|
r += plane[s] * w0 + plane[s + 4] * w1;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { littleEndian, isOpaque, premultiply8, unpremultiply8 } from "./alpha.js";
|
|
2
|
+
function span(start, step, limit, from, to) {
|
|
3
|
+
if (step === 0)
|
|
4
|
+
return start >= 0 && start < limit ? [from, to] : [from, from];
|
|
5
|
+
const a = -start / step, b = (limit - start) / step;
|
|
6
|
+
const lo = Math.floor(Math.min(a, b)) - 1, hi = Math.ceil(Math.max(a, b)) + 1;
|
|
7
|
+
return [Math.max(from, lo), Math.max(Math.max(from, lo), Math.min(to, hi))];
|
|
8
|
+
}
|
|
9
|
+
export function rotateBilinear(src, width, height, out, outWidth, outHeight, sin, cos) {
|
|
10
|
+
if (!littleEndian)
|
|
11
|
+
return false;
|
|
12
|
+
let bitmap = src;
|
|
13
|
+
if (!isOpaque(src))
|
|
14
|
+
premultiply8(src, bitmap = new Uint8ClampedArray(src.length));
|
|
15
|
+
const pixels = new Int32Array(bitmap.buffer, bitmap.byteOffset, width * height);
|
|
16
|
+
const stride = width + 2;
|
|
17
|
+
const padded = new Int32Array(stride * (height + 2));
|
|
18
|
+
for (let y = 0; y < height; y++)
|
|
19
|
+
padded.set(pixels.subarray(y * width, (y + 1) * width), (y + 1) * stride + 1);
|
|
20
|
+
const result = new Int32Array(out.buffer, out.byteOffset, outWidth * outHeight);
|
|
21
|
+
const x0 = 0.5 - outWidth / 2, cx = width / 2 + 0.5, cy = height / 2 + 0.5;
|
|
22
|
+
for (let oy = 0; oy < outHeight; oy++) {
|
|
23
|
+
const dy = oy + 0.5 - outHeight / 2;
|
|
24
|
+
const sx0 = x0 * cos - dy * sin + cx, sy0 = x0 * sin + dy * cos + cy;
|
|
25
|
+
const [xFrom, xTo] = span(sx0, cos, width + 1, 0, outWidth);
|
|
26
|
+
const [from, to] = span(sy0, sin, height + 1, xFrom, xTo);
|
|
27
|
+
let o = oy * outWidth + from, sx = sx0 + from * cos, sy = sy0 + from * sin;
|
|
28
|
+
for (let ox = from; ox < to; ox++, o++, sx += cos, sy += sin) {
|
|
29
|
+
if (!(sx >= 0 && sy >= 0 && sx < width + 1 && sy < height + 1))
|
|
30
|
+
continue;
|
|
31
|
+
const ix = sx | 0, iy = sy | 0;
|
|
32
|
+
const fx = (sx - ix) * 256 + 0.5 | 0, fy = (sy - iy) * 256 + 0.5 | 0;
|
|
33
|
+
const w11 = fx * fy + 128 >> 8, w10 = fx - w11, w01 = fy - w11, w00 = 256 - fx - fy + w11;
|
|
34
|
+
const i = iy * stride + ix;
|
|
35
|
+
const p00 = padded[i], p10 = padded[i + 1], p01 = padded[i + stride], p11 = padded[i + stride + 1];
|
|
36
|
+
const rb = Math.imul(p00 & 0xff00ff, w00) + Math.imul(p10 & 0xff00ff, w10) + Math.imul(p01 & 0xff00ff, w01) + Math.imul(p11 & 0xff00ff, w11) + 0x800080;
|
|
37
|
+
const ga = Math.imul(p00 >>> 8 & 0xff00ff, w00) + Math.imul(p10 >>> 8 & 0xff00ff, w10) + Math.imul(p01 >>> 8 & 0xff00ff, w01) + Math.imul(p11 >>> 8 & 0xff00ff, w11) + 0x800080;
|
|
38
|
+
result[o] = (rb >>> 8 & 0xff00ff) | (ga & 0xff00ff00);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
unpremultiply8(out);
|
|
42
|
+
return true;
|
|
43
|
+
}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '3.
|
|
1
|
+
export const VERSION = '3.4.0';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
|
|
2
|
+
For parts of HarfBuzz that are licensed under different licenses see individual
|
|
3
|
+
files names COPYING in subdirectories where applicable.
|
|
4
|
+
|
|
5
|
+
Copyright © 2010-2022 Google, Inc.
|
|
6
|
+
Copyright © 2015-2020 Ebrahim Byagowi
|
|
7
|
+
Copyright © 2019,2020 Facebook, Inc.
|
|
8
|
+
Copyright © 2012,2015 Mozilla Foundation
|
|
9
|
+
Copyright © 2011 Codethink Limited
|
|
10
|
+
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
|
|
11
|
+
Copyright © 2009 Keith Stribley
|
|
12
|
+
Copyright © 2011 Martin Hosken and SIL International
|
|
13
|
+
Copyright © 2007 Chris Wilson
|
|
14
|
+
Copyright © 2005,2006,2020,2021,2022,2023 Behdad Esfahbod
|
|
15
|
+
Copyright © 2004,2007,2008,2009,2010,2013,2021,2022,2023 Red Hat, Inc.
|
|
16
|
+
Copyright © 1998-2005 David Turner and Werner Lemberg
|
|
17
|
+
Copyright © 2016 Igalia S.L.
|
|
18
|
+
Copyright © 2022 Matthias Clasen
|
|
19
|
+
Copyright © 2018,2021 Khaled Hosny
|
|
20
|
+
Copyright © 2018,2019,2020 Adobe, Inc
|
|
21
|
+
Copyright © 2013-2015 Alexei Podtelezhnikov
|
|
22
|
+
|
|
23
|
+
For full copyright notices consult the individual files in the package.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Permission is hereby granted, without written agreement and without
|
|
27
|
+
license or royalty fees, to use, copy, modify, and distribute this
|
|
28
|
+
software and its documentation for any purpose, provided that the
|
|
29
|
+
above copyright notice and the following two paragraphs appear in
|
|
30
|
+
all copies of this software.
|
|
31
|
+
|
|
32
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
33
|
+
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
34
|
+
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
35
|
+
IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
36
|
+
DAMAGE.
|
|
37
|
+
|
|
38
|
+
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
39
|
+
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
40
|
+
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
41
|
+
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
42
|
+
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
UNICODE LICENSE V3
|
|
2
|
+
|
|
3
|
+
COPYRIGHT AND PERMISSION NOTICE
|
|
4
|
+
|
|
5
|
+
Copyright © 1991-2026 Unicode, Inc.
|
|
6
|
+
|
|
7
|
+
NOTICE TO USER: Carefully read the following legal agreement. BY
|
|
8
|
+
DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
|
|
9
|
+
SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
|
|
10
|
+
TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
|
|
11
|
+
DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
14
|
+
copy of data files and any associated documentation (the "Data Files") or
|
|
15
|
+
software and any associated documentation (the "Software") to deal in the
|
|
16
|
+
Data Files or Software without restriction, including without limitation
|
|
17
|
+
the rights to use, copy, modify, merge, publish, distribute, and/or sell
|
|
18
|
+
copies of the Data Files or Software, and to permit persons to whom the
|
|
19
|
+
Data Files or Software are furnished to do so, provided that either (a)
|
|
20
|
+
this copyright and permission notice appear with all copies of the Data
|
|
21
|
+
Files or Software, or (b) this copyright and permission notice appear in
|
|
22
|
+
associated Documentation.
|
|
23
|
+
|
|
24
|
+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
25
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
26
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
27
|
+
THIRD PARTY RIGHTS.
|
|
28
|
+
|
|
29
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
|
|
30
|
+
BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
|
|
31
|
+
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
32
|
+
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
33
|
+
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
|
|
34
|
+
FILES OR SOFTWARE.
|
|
35
|
+
|
|
36
|
+
Except as contained in this notice, the name of a copyright holder shall
|
|
37
|
+
not be used in advertising or otherwise to promote the sale, use or other
|
|
38
|
+
dealings in these Data Files or Software without prior written
|
|
39
|
+
authorization of the copyright holder.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imagescript",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "zero-dependency javascript image manipulation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -24,8 +24,10 @@
|
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "node scripts/build.js",
|
|
26
26
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
27
|
+
"lint": "eslint",
|
|
27
28
|
"docs": "node scripts/docs.js",
|
|
28
29
|
"test": "npm run build && node ./tests/run.js",
|
|
30
|
+
"coverage": "node scripts/build.js --source-maps && c8 node ./tests/run.js && node scripts/coverage-report.js",
|
|
29
31
|
"prepack": "npm run build",
|
|
30
32
|
"version": "node scripts/version.js && git add src/version.ts jsr.json"
|
|
31
33
|
},
|
|
@@ -49,9 +51,25 @@
|
|
|
49
51
|
"picture",
|
|
50
52
|
"thumbnail",
|
|
51
53
|
"webp",
|
|
54
|
+
"avif",
|
|
55
|
+
"av1",
|
|
56
|
+
"jxl",
|
|
57
|
+
"jpeg xl",
|
|
52
58
|
"apng",
|
|
53
59
|
"tiff",
|
|
54
60
|
"tga",
|
|
61
|
+
"bmp",
|
|
62
|
+
"ico",
|
|
63
|
+
"cur",
|
|
64
|
+
"qoi",
|
|
65
|
+
"netpbm",
|
|
66
|
+
"ppm",
|
|
67
|
+
"pgm",
|
|
68
|
+
"pbm",
|
|
69
|
+
"pam",
|
|
70
|
+
"pfm",
|
|
71
|
+
"hdr",
|
|
72
|
+
"radiance",
|
|
55
73
|
"animation",
|
|
56
74
|
"text rendering",
|
|
57
75
|
"font"
|
|
@@ -66,7 +84,12 @@
|
|
|
66
84
|
"node": ">=22.13.0"
|
|
67
85
|
},
|
|
68
86
|
"devDependencies": {
|
|
87
|
+
"@eslint/js": "9.39.5",
|
|
88
|
+
"c8": "12.0.0",
|
|
89
|
+
"eslint": "9.39.5",
|
|
90
|
+
"eslint-plugin-sonarjs": "4.2.2",
|
|
69
91
|
"typedoc": "0.27.9",
|
|
70
|
-
"typescript": "5.7.3"
|
|
92
|
+
"typescript": "5.7.3",
|
|
93
|
+
"typescript-eslint": "8.72.0"
|
|
71
94
|
}
|
|
72
95
|
}
|