cross-image 0.1.2 → 0.1.5
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 +143 -606
- package/esm/mod.d.ts +5 -5
- package/esm/mod.js +5 -5
- package/esm/src/formats/ascii.d.ts +11 -0
- package/esm/src/formats/ascii.js +14 -0
- package/esm/src/formats/bmp.d.ts +17 -0
- package/esm/src/formats/bmp.js +20 -0
- package/esm/src/formats/gif.d.ts +21 -0
- package/esm/src/formats/gif.js +26 -0
- package/esm/src/formats/jpeg.d.ts +17 -0
- package/esm/src/formats/jpeg.js +20 -0
- package/esm/src/formats/png.d.ts +17 -0
- package/esm/src/formats/png.js +20 -0
- package/esm/src/formats/raw.d.ts +17 -0
- package/esm/src/formats/raw.js +20 -0
- package/esm/src/formats/tiff.d.ts +16 -0
- package/esm/src/formats/tiff.js +37 -12
- package/esm/src/formats/webp.d.ts +18 -0
- package/esm/src/formats/webp.js +21 -0
- package/esm/src/image.d.ts +34 -1
- package/esm/src/image.js +55 -9
- package/esm/src/utils/security.d.ts +28 -0
- package/esm/src/utils/security.js +48 -0
- package/esm/src/utils/webp_decoder.js +3 -0
- package/package.json +1 -4
- package/script/mod.d.ts +5 -5
- package/script/mod.js +5 -5
- package/script/src/formats/ascii.d.ts +11 -0
- package/script/src/formats/ascii.js +14 -0
- package/script/src/formats/bmp.d.ts +17 -0
- package/script/src/formats/bmp.js +20 -0
- package/script/src/formats/gif.d.ts +21 -0
- package/script/src/formats/gif.js +26 -0
- package/script/src/formats/jpeg.d.ts +17 -0
- package/script/src/formats/jpeg.js +20 -0
- package/script/src/formats/png.d.ts +17 -0
- package/script/src/formats/png.js +20 -0
- package/script/src/formats/raw.d.ts +17 -0
- package/script/src/formats/raw.js +20 -0
- package/script/src/formats/tiff.d.ts +16 -0
- package/script/src/formats/tiff.js +37 -12
- package/script/src/formats/webp.d.ts +18 -0
- package/script/src/formats/webp.js +21 -0
- package/script/src/image.d.ts +34 -1
- package/script/src/image.js +55 -9
- package/script/src/utils/security.d.ts +28 -0
- package/script/src/utils/security.js +53 -0
- package/script/src/utils/webp_decoder.js +3 -0
- package/esm/mod.d.ts.map +0 -1
- package/esm/src/formats/ascii.d.ts.map +0 -1
- package/esm/src/formats/bmp.d.ts.map +0 -1
- package/esm/src/formats/gif.d.ts.map +0 -1
- package/esm/src/formats/jpeg.d.ts.map +0 -1
- package/esm/src/formats/png.d.ts.map +0 -1
- package/esm/src/formats/raw.d.ts.map +0 -1
- package/esm/src/formats/tiff.d.ts.map +0 -1
- package/esm/src/formats/webp.d.ts.map +0 -1
- package/esm/src/image.d.ts.map +0 -1
- package/esm/src/types.d.ts.map +0 -1
- package/esm/src/utils/gif_decoder.d.ts.map +0 -1
- package/esm/src/utils/gif_encoder.d.ts.map +0 -1
- package/esm/src/utils/jpeg_decoder.d.ts.map +0 -1
- package/esm/src/utils/jpeg_encoder.d.ts.map +0 -1
- package/esm/src/utils/lzw.d.ts.map +0 -1
- package/esm/src/utils/resize.d.ts.map +0 -1
- package/esm/src/utils/tiff_lzw.d.ts.map +0 -1
- package/esm/src/utils/webp_decoder.d.ts.map +0 -1
- package/esm/src/utils/webp_encoder.d.ts.map +0 -1
- package/script/mod.d.ts.map +0 -1
- package/script/src/formats/ascii.d.ts.map +0 -1
- package/script/src/formats/bmp.d.ts.map +0 -1
- package/script/src/formats/gif.d.ts.map +0 -1
- package/script/src/formats/jpeg.d.ts.map +0 -1
- package/script/src/formats/png.d.ts.map +0 -1
- package/script/src/formats/raw.d.ts.map +0 -1
- package/script/src/formats/tiff.d.ts.map +0 -1
- package/script/src/formats/webp.d.ts.map +0 -1
- package/script/src/image.d.ts.map +0 -1
- package/script/src/types.d.ts.map +0 -1
- package/script/src/utils/gif_decoder.d.ts.map +0 -1
- package/script/src/utils/gif_encoder.d.ts.map +0 -1
- package/script/src/utils/jpeg_decoder.d.ts.map +0 -1
- package/script/src/utils/jpeg_encoder.d.ts.map +0 -1
- package/script/src/utils/lzw.d.ts.map +0 -1
- package/script/src/utils/resize.d.ts.map +0 -1
- package/script/src/utils/tiff_lzw.d.ts.map +0 -1
- package/script/src/utils/webp_decoder.d.ts.map +0 -1
- package/script/src/utils/webp_encoder.d.ts.map +0 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TIFFFormat = void 0;
|
|
4
4
|
const tiff_lzw_js_1 = require("../utils/tiff_lzw.js");
|
|
5
|
+
const security_js_1 = require("../utils/security.js");
|
|
5
6
|
// Constants for unit conversions
|
|
6
7
|
const DEFAULT_DPI = 72;
|
|
7
8
|
/**
|
|
@@ -13,12 +14,14 @@ const DEFAULT_DPI = 72;
|
|
|
13
14
|
*/
|
|
14
15
|
class TIFFFormat {
|
|
15
16
|
constructor() {
|
|
17
|
+
/** Format name identifier */
|
|
16
18
|
Object.defineProperty(this, "name", {
|
|
17
19
|
enumerable: true,
|
|
18
20
|
configurable: true,
|
|
19
21
|
writable: true,
|
|
20
22
|
value: "tiff"
|
|
21
23
|
});
|
|
24
|
+
/** MIME type for TIFF images */
|
|
22
25
|
Object.defineProperty(this, "mimeType", {
|
|
23
26
|
enumerable: true,
|
|
24
27
|
configurable: true,
|
|
@@ -26,9 +29,18 @@ class TIFFFormat {
|
|
|
26
29
|
value: "image/tiff"
|
|
27
30
|
});
|
|
28
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if this format supports multiple frames (pages)
|
|
34
|
+
* @returns true for TIFF format
|
|
35
|
+
*/
|
|
29
36
|
supportsMultipleFrames() {
|
|
30
37
|
return true;
|
|
31
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if the given data is a TIFF image
|
|
41
|
+
* @param data Raw image data to check
|
|
42
|
+
* @returns true if data has TIFF signature
|
|
43
|
+
*/
|
|
32
44
|
canDecode(data) {
|
|
33
45
|
// TIFF signature: "II" (little-endian) or "MM" (big-endian) followed by 42
|
|
34
46
|
return data.length >= 4 &&
|
|
@@ -38,6 +50,11 @@ class TIFFFormat {
|
|
|
38
50
|
data[3] === 0x2a) // "MM\0*"
|
|
39
51
|
);
|
|
40
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Decode TIFF image data to RGBA (first page only)
|
|
55
|
+
* @param data Raw TIFF image data
|
|
56
|
+
* @returns Decoded image data with RGBA pixels of first page
|
|
57
|
+
*/
|
|
41
58
|
async decode(data) {
|
|
42
59
|
if (!this.canDecode(data)) {
|
|
43
60
|
throw new Error("Invalid TIFF signature");
|
|
@@ -147,7 +164,7 @@ class TIFFFormat {
|
|
|
147
164
|
// IFD (Image File Directory)
|
|
148
165
|
const ifdStart = result.length;
|
|
149
166
|
// Count number of entries (including metadata)
|
|
150
|
-
let numEntries =
|
|
167
|
+
let numEntries = 12; // Base entries (including ExtraSamples)
|
|
151
168
|
if (metadata?.description)
|
|
152
169
|
numEntries++;
|
|
153
170
|
if (metadata?.author)
|
|
@@ -187,6 +204,8 @@ class TIFFFormat {
|
|
|
187
204
|
const yResOffset = dataOffset;
|
|
188
205
|
this.writeIFDEntry(result, 0x011b, 5, 1, yResOffset);
|
|
189
206
|
dataOffset += 8;
|
|
207
|
+
// ExtraSamples (0x0152) - 2 = unassociated alpha
|
|
208
|
+
this.writeIFDEntry(result, 0x0152, 3, 1, 2);
|
|
190
209
|
// Optional metadata entries
|
|
191
210
|
if (metadata?.description) {
|
|
192
211
|
const descBytes = new TextEncoder().encode(metadata.description + "\0");
|
|
@@ -213,6 +232,11 @@ class TIFFFormat {
|
|
|
213
232
|
// Next IFD offset (0 = no more IFDs)
|
|
214
233
|
this.writeUint32LE(result, 0);
|
|
215
234
|
// Write variable-length data
|
|
235
|
+
// BitsPerSample values (must be written first to match offset calculation)
|
|
236
|
+
this.writeUint16LE(result, 8);
|
|
237
|
+
this.writeUint16LE(result, 8);
|
|
238
|
+
this.writeUint16LE(result, 8);
|
|
239
|
+
this.writeUint16LE(result, 8);
|
|
216
240
|
// XResolution value (rational)
|
|
217
241
|
const dpiX = metadata?.dpiX ?? DEFAULT_DPI;
|
|
218
242
|
this.writeUint32LE(result, dpiX);
|
|
@@ -221,11 +245,6 @@ class TIFFFormat {
|
|
|
221
245
|
const dpiY = metadata?.dpiY ?? DEFAULT_DPI;
|
|
222
246
|
this.writeUint32LE(result, dpiY);
|
|
223
247
|
this.writeUint32LE(result, 1);
|
|
224
|
-
// BitsPerSample values
|
|
225
|
-
this.writeUint16LE(result, 8);
|
|
226
|
-
this.writeUint16LE(result, 8);
|
|
227
|
-
this.writeUint16LE(result, 8);
|
|
228
|
-
this.writeUint16LE(result, 8);
|
|
229
248
|
// Write metadata strings
|
|
230
249
|
if (metadata?.description) {
|
|
231
250
|
const descBytes = new TextEncoder().encode(metadata.description + "\0");
|
|
@@ -361,7 +380,7 @@ class TIFFFormat {
|
|
|
361
380
|
ifdOffsets.push(currentOffset);
|
|
362
381
|
const ifdStart = result.length;
|
|
363
382
|
// Count number of entries (including metadata only for first page)
|
|
364
|
-
let numEntries =
|
|
383
|
+
let numEntries = 12; // Base entries (including ExtraSamples)
|
|
365
384
|
if (i === 0 && imageData.metadata) {
|
|
366
385
|
if (imageData.metadata.description)
|
|
367
386
|
numEntries++;
|
|
@@ -405,6 +424,8 @@ class TIFFFormat {
|
|
|
405
424
|
const yResOffset = dataOffset;
|
|
406
425
|
this.writeIFDEntry(result, 0x011b, 5, 1, yResOffset);
|
|
407
426
|
dataOffset += 8;
|
|
427
|
+
// ExtraSamples (0x0152) - 2 = unassociated alpha
|
|
428
|
+
this.writeIFDEntry(result, 0x0152, 3, 1, 2);
|
|
408
429
|
// Metadata (only for first page)
|
|
409
430
|
if (i === 0 && imageData.metadata) {
|
|
410
431
|
if (imageData.metadata.description) {
|
|
@@ -435,6 +456,11 @@ class TIFFFormat {
|
|
|
435
456
|
this.writeUint32LE(result, nextIFDOffset);
|
|
436
457
|
currentOffset = dataOffset;
|
|
437
458
|
// Write variable-length data
|
|
459
|
+
// BitsPerSample values (must be written first to match offset calculation)
|
|
460
|
+
this.writeUint16LE(result, 8);
|
|
461
|
+
this.writeUint16LE(result, 8);
|
|
462
|
+
this.writeUint16LE(result, 8);
|
|
463
|
+
this.writeUint16LE(result, 8);
|
|
438
464
|
// XResolution value (rational)
|
|
439
465
|
const dpiX = (i === 0 && imageData.metadata?.dpiX) ||
|
|
440
466
|
DEFAULT_DPI;
|
|
@@ -445,11 +471,6 @@ class TIFFFormat {
|
|
|
445
471
|
DEFAULT_DPI;
|
|
446
472
|
this.writeUint32LE(result, dpiY);
|
|
447
473
|
this.writeUint32LE(result, 1);
|
|
448
|
-
// BitsPerSample values
|
|
449
|
-
this.writeUint16LE(result, 8);
|
|
450
|
-
this.writeUint16LE(result, 8);
|
|
451
|
-
this.writeUint16LE(result, 8);
|
|
452
|
-
this.writeUint16LE(result, 8);
|
|
453
474
|
// Write metadata strings (only for first page)
|
|
454
475
|
if (i === 0 && imageData.metadata) {
|
|
455
476
|
if (imageData.metadata.description) {
|
|
@@ -710,6 +731,8 @@ class TIFFFormat {
|
|
|
710
731
|
// Uncompressed
|
|
711
732
|
pixelData = data.slice(stripOffset, stripOffset + stripByteCount);
|
|
712
733
|
}
|
|
734
|
+
// Validate dimensions for security (prevent integer overflow and heap exhaustion)
|
|
735
|
+
(0, security_js_1.validateImageDimensions)(width, height);
|
|
713
736
|
// Convert to RGBA
|
|
714
737
|
const rgba = new Uint8Array(width * height * 4);
|
|
715
738
|
let srcPos = 0;
|
|
@@ -773,6 +796,8 @@ class TIFFFormat {
|
|
|
773
796
|
// Uncompressed
|
|
774
797
|
pixelData = data.slice(stripOffset, stripOffset + stripByteCount);
|
|
775
798
|
}
|
|
799
|
+
// Validate dimensions for security (prevent integer overflow and heap exhaustion)
|
|
800
|
+
(0, security_js_1.validateImageDimensions)(width, height);
|
|
776
801
|
// Convert to RGBA
|
|
777
802
|
const rgba = new Uint8Array(width * height * 4);
|
|
778
803
|
let srcPos = 0;
|
|
@@ -4,10 +4,28 @@ import type { ImageData, ImageFormat, WebPEncodeOptions } from "../types.js";
|
|
|
4
4
|
* Implements a basic WebP decoder and encoder
|
|
5
5
|
*/
|
|
6
6
|
export declare class WebPFormat implements ImageFormat {
|
|
7
|
+
/** Format name identifier */
|
|
7
8
|
readonly name = "webp";
|
|
9
|
+
/** MIME type for WebP images */
|
|
8
10
|
readonly mimeType = "image/webp";
|
|
11
|
+
/**
|
|
12
|
+
* Check if the given data is a WebP image
|
|
13
|
+
* @param data Raw image data to check
|
|
14
|
+
* @returns true if data has WebP signature
|
|
15
|
+
*/
|
|
9
16
|
canDecode(data: Uint8Array): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Decode WebP image data to RGBA
|
|
19
|
+
* @param data Raw WebP image data
|
|
20
|
+
* @returns Decoded image data with RGBA pixels
|
|
21
|
+
*/
|
|
10
22
|
decode(data: Uint8Array): Promise<ImageData>;
|
|
23
|
+
/**
|
|
24
|
+
* Encode RGBA image data to WebP format
|
|
25
|
+
* @param imageData Image data to encode
|
|
26
|
+
* @param options Optional WebP encoding options
|
|
27
|
+
* @returns Encoded WebP image bytes
|
|
28
|
+
*/
|
|
11
29
|
encode(imageData: ImageData, options?: WebPEncodeOptions): Promise<Uint8Array>;
|
|
12
30
|
private readUint32LE;
|
|
13
31
|
private readUint24LE;
|
|
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.WebPFormat = void 0;
|
|
37
|
+
const security_js_1 = require("../utils/security.js");
|
|
37
38
|
// Default quality for WebP encoding when not specified
|
|
38
39
|
const DEFAULT_WEBP_QUALITY = 90;
|
|
39
40
|
/**
|
|
@@ -42,12 +43,14 @@ const DEFAULT_WEBP_QUALITY = 90;
|
|
|
42
43
|
*/
|
|
43
44
|
class WebPFormat {
|
|
44
45
|
constructor() {
|
|
46
|
+
/** Format name identifier */
|
|
45
47
|
Object.defineProperty(this, "name", {
|
|
46
48
|
enumerable: true,
|
|
47
49
|
configurable: true,
|
|
48
50
|
writable: true,
|
|
49
51
|
value: "webp"
|
|
50
52
|
});
|
|
53
|
+
/** MIME type for WebP images */
|
|
51
54
|
Object.defineProperty(this, "mimeType", {
|
|
52
55
|
enumerable: true,
|
|
53
56
|
configurable: true,
|
|
@@ -55,6 +58,11 @@ class WebPFormat {
|
|
|
55
58
|
value: "image/webp"
|
|
56
59
|
});
|
|
57
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if the given data is a WebP image
|
|
63
|
+
* @param data Raw image data to check
|
|
64
|
+
* @returns true if data has WebP signature
|
|
65
|
+
*/
|
|
58
66
|
canDecode(data) {
|
|
59
67
|
// WebP signature: "RIFF" + size + "WEBP"
|
|
60
68
|
return data.length >= 12 &&
|
|
@@ -63,6 +71,11 @@ class WebPFormat {
|
|
|
63
71
|
data[8] === 0x57 && data[9] === 0x45 && // "WE"
|
|
64
72
|
data[10] === 0x42 && data[11] === 0x50; // "BP"
|
|
65
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Decode WebP image data to RGBA
|
|
76
|
+
* @param data Raw WebP image data
|
|
77
|
+
* @returns Decoded image data with RGBA pixels
|
|
78
|
+
*/
|
|
66
79
|
async decode(data) {
|
|
67
80
|
if (!this.canDecode(data)) {
|
|
68
81
|
throw new Error("Invalid WebP signature");
|
|
@@ -125,6 +138,8 @@ class WebPFormat {
|
|
|
125
138
|
if (width === 0 || height === 0) {
|
|
126
139
|
throw new Error("Could not determine WebP dimensions");
|
|
127
140
|
}
|
|
141
|
+
// Validate dimensions for security (prevent integer overflow and heap exhaustion)
|
|
142
|
+
(0, security_js_1.validateImageDimensions)(width, height);
|
|
128
143
|
// For a pure JS implementation, we'd need to implement full WebP decoding
|
|
129
144
|
// which is very complex. Instead, we'll use the browser/runtime's decoder.
|
|
130
145
|
const rgba = await this.decodeUsingRuntime(data, width, height);
|
|
@@ -135,6 +150,12 @@ class WebPFormat {
|
|
|
135
150
|
metadata: Object.keys(metadata).length > 0 ? metadata : undefined,
|
|
136
151
|
};
|
|
137
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Encode RGBA image data to WebP format
|
|
155
|
+
* @param imageData Image data to encode
|
|
156
|
+
* @param options Optional WebP encoding options
|
|
157
|
+
* @returns Encoded WebP image bytes
|
|
158
|
+
*/
|
|
138
159
|
async encode(imageData, options) {
|
|
139
160
|
const { width, height, data, metadata } = imageData;
|
|
140
161
|
const quality = options?.quality ?? DEFAULT_WEBP_QUALITY;
|
package/script/src/image.d.ts
CHANGED
|
@@ -72,24 +72,49 @@ export declare class Image {
|
|
|
72
72
|
* Get all registered formats
|
|
73
73
|
*/
|
|
74
74
|
static getFormats(): readonly ImageFormat[];
|
|
75
|
+
/**
|
|
76
|
+
* Decode an image from bytes
|
|
77
|
+
* @param data Raw image data
|
|
78
|
+
* @param format Optional format hint (e.g., "png", "jpeg", "webp")
|
|
79
|
+
* @returns Image instance
|
|
80
|
+
*/
|
|
81
|
+
static decode(data: Uint8Array, format?: string): Promise<Image>;
|
|
75
82
|
/**
|
|
76
83
|
* Read an image from bytes
|
|
84
|
+
* @deprecated Use `decode()` instead. This method will be removed in a future version.
|
|
77
85
|
* @param data Raw image data
|
|
78
86
|
* @param format Optional format hint (e.g., "png", "jpeg", "webp")
|
|
79
87
|
* @returns Image instance
|
|
80
88
|
*/
|
|
81
89
|
static read(data: Uint8Array, format?: string): Promise<Image>;
|
|
90
|
+
/**
|
|
91
|
+
* Decode all frames from a multi-frame image (GIF animation, multi-page TIFF)
|
|
92
|
+
* @param data Raw image data
|
|
93
|
+
* @param format Optional format hint (e.g., "gif", "tiff")
|
|
94
|
+
* @returns MultiFrameImageData with all frames
|
|
95
|
+
*/
|
|
96
|
+
static decodeFrames(data: Uint8Array, format?: string): Promise<MultiFrameImageData>;
|
|
82
97
|
/**
|
|
83
98
|
* Read all frames from a multi-frame image (GIF animation, multi-page TIFF)
|
|
99
|
+
* @deprecated Use `decodeFrames()` instead. This method will be removed in a future version.
|
|
84
100
|
* @param data Raw image data
|
|
85
101
|
* @param format Optional format hint (e.g., "gif", "tiff")
|
|
86
102
|
* @returns MultiFrameImageData with all frames
|
|
87
103
|
*/
|
|
88
104
|
static readFrames(data: Uint8Array, format?: string): Promise<MultiFrameImageData>;
|
|
105
|
+
/**
|
|
106
|
+
* Encode multi-frame image data to bytes in the specified format
|
|
107
|
+
* @param format Format name (e.g., "gif", "tiff")
|
|
108
|
+
* @param imageData Multi-frame image data to encode
|
|
109
|
+
* @param options Optional format-specific encoding options
|
|
110
|
+
* @returns Encoded image bytes
|
|
111
|
+
*/
|
|
112
|
+
static encodeFrames(format: string, imageData: MultiFrameImageData, options?: unknown): Promise<Uint8Array>;
|
|
89
113
|
/**
|
|
90
114
|
* Save multi-frame image data to bytes in the specified format
|
|
115
|
+
* @deprecated Use `encodeFrames()` instead. This method will be removed in a future version.
|
|
91
116
|
* @param format Format name (e.g., "gif", "tiff")
|
|
92
|
-
* @param imageData Multi-frame image data to
|
|
117
|
+
* @param imageData Multi-frame image data to encode
|
|
93
118
|
* @param options Optional format-specific encoding options
|
|
94
119
|
* @returns Encoded image bytes
|
|
95
120
|
*/
|
|
@@ -108,8 +133,16 @@ export declare class Image {
|
|
|
108
133
|
* @returns This image instance for chaining
|
|
109
134
|
*/
|
|
110
135
|
resize(options: ResizeOptions): this;
|
|
136
|
+
/**
|
|
137
|
+
* Encode the image to bytes in the specified format
|
|
138
|
+
* @param format Format name (e.g., "png", "jpeg", "webp", "ascii")
|
|
139
|
+
* @param options Optional format-specific encoding options
|
|
140
|
+
* @returns Encoded image bytes
|
|
141
|
+
*/
|
|
142
|
+
encode(format: string, options?: unknown): Promise<Uint8Array>;
|
|
111
143
|
/**
|
|
112
144
|
* Save the image to bytes in the specified format
|
|
145
|
+
* @deprecated Use `encode()` instead. This method will be removed in a future version.
|
|
113
146
|
* @param format Format name (e.g., "png", "jpeg", "webp", "ascii")
|
|
114
147
|
* @param options Optional format-specific encoding options
|
|
115
148
|
* @returns Encoded image bytes
|
package/script/src/image.js
CHANGED
|
@@ -10,6 +10,7 @@ const tiff_js_1 = require("./formats/tiff.js");
|
|
|
10
10
|
const bmp_js_1 = require("./formats/bmp.js");
|
|
11
11
|
const raw_js_1 = require("./formats/raw.js");
|
|
12
12
|
const ascii_js_1 = require("./formats/ascii.js");
|
|
13
|
+
const security_js_1 = require("./utils/security.js");
|
|
13
14
|
/**
|
|
14
15
|
* Main Image class for reading, manipulating, and saving images
|
|
15
16
|
*/
|
|
@@ -153,12 +154,12 @@ class Image {
|
|
|
153
154
|
return Image.formats;
|
|
154
155
|
}
|
|
155
156
|
/**
|
|
156
|
-
*
|
|
157
|
+
* Decode an image from bytes
|
|
157
158
|
* @param data Raw image data
|
|
158
159
|
* @param format Optional format hint (e.g., "png", "jpeg", "webp")
|
|
159
160
|
* @returns Image instance
|
|
160
161
|
*/
|
|
161
|
-
static async
|
|
162
|
+
static async decode(data, format) {
|
|
162
163
|
const image = new Image();
|
|
163
164
|
// Try specified format first
|
|
164
165
|
if (format) {
|
|
@@ -178,12 +179,22 @@ class Image {
|
|
|
178
179
|
throw new Error("Unsupported or unrecognized image format");
|
|
179
180
|
}
|
|
180
181
|
/**
|
|
181
|
-
* Read
|
|
182
|
+
* Read an image from bytes
|
|
183
|
+
* @deprecated Use `decode()` instead. This method will be removed in a future version.
|
|
184
|
+
* @param data Raw image data
|
|
185
|
+
* @param format Optional format hint (e.g., "png", "jpeg", "webp")
|
|
186
|
+
* @returns Image instance
|
|
187
|
+
*/
|
|
188
|
+
static read(data, format) {
|
|
189
|
+
return Image.decode(data, format);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Decode all frames from a multi-frame image (GIF animation, multi-page TIFF)
|
|
182
193
|
* @param data Raw image data
|
|
183
194
|
* @param format Optional format hint (e.g., "gif", "tiff")
|
|
184
195
|
* @returns MultiFrameImageData with all frames
|
|
185
196
|
*/
|
|
186
|
-
static async
|
|
197
|
+
static async decodeFrames(data, format) {
|
|
187
198
|
// Try specified format first
|
|
188
199
|
if (format) {
|
|
189
200
|
const handler = Image.formats.find((f) => f.name === format);
|
|
@@ -200,13 +211,23 @@ class Image {
|
|
|
200
211
|
throw new Error("Unsupported or unrecognized multi-frame image format");
|
|
201
212
|
}
|
|
202
213
|
/**
|
|
203
|
-
*
|
|
214
|
+
* Read all frames from a multi-frame image (GIF animation, multi-page TIFF)
|
|
215
|
+
* @deprecated Use `decodeFrames()` instead. This method will be removed in a future version.
|
|
216
|
+
* @param data Raw image data
|
|
217
|
+
* @param format Optional format hint (e.g., "gif", "tiff")
|
|
218
|
+
* @returns MultiFrameImageData with all frames
|
|
219
|
+
*/
|
|
220
|
+
static readFrames(data, format) {
|
|
221
|
+
return Image.decodeFrames(data, format);
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Encode multi-frame image data to bytes in the specified format
|
|
204
225
|
* @param format Format name (e.g., "gif", "tiff")
|
|
205
|
-
* @param imageData Multi-frame image data to
|
|
226
|
+
* @param imageData Multi-frame image data to encode
|
|
206
227
|
* @param options Optional format-specific encoding options
|
|
207
228
|
* @returns Encoded image bytes
|
|
208
229
|
*/
|
|
209
|
-
static async
|
|
230
|
+
static async encodeFrames(format, imageData, options) {
|
|
210
231
|
const handler = Image.formats.find((f) => f.name === format);
|
|
211
232
|
if (!handler) {
|
|
212
233
|
throw new Error(`Unsupported format: ${format}`);
|
|
@@ -216,6 +237,17 @@ class Image {
|
|
|
216
237
|
}
|
|
217
238
|
return await handler.encodeFrames(imageData, options);
|
|
218
239
|
}
|
|
240
|
+
/**
|
|
241
|
+
* Save multi-frame image data to bytes in the specified format
|
|
242
|
+
* @deprecated Use `encodeFrames()` instead. This method will be removed in a future version.
|
|
243
|
+
* @param format Format name (e.g., "gif", "tiff")
|
|
244
|
+
* @param imageData Multi-frame image data to encode
|
|
245
|
+
* @param options Optional format-specific encoding options
|
|
246
|
+
* @returns Encoded image bytes
|
|
247
|
+
*/
|
|
248
|
+
static saveFrames(format, imageData, options) {
|
|
249
|
+
return Image.encodeFrames(format, imageData, options);
|
|
250
|
+
}
|
|
219
251
|
/**
|
|
220
252
|
* Create an image from raw RGBA data
|
|
221
253
|
* @param width Image width
|
|
@@ -224,6 +256,8 @@ class Image {
|
|
|
224
256
|
* @returns Image instance
|
|
225
257
|
*/
|
|
226
258
|
static fromRGBA(width, height, data) {
|
|
259
|
+
// Validate dimensions for security (prevent integer overflow and heap exhaustion)
|
|
260
|
+
(0, security_js_1.validateImageDimensions)(width, height);
|
|
227
261
|
if (data.length !== width * height * 4) {
|
|
228
262
|
throw new Error(`Data length mismatch: expected ${width * height * 4}, got ${data.length}`);
|
|
229
263
|
}
|
|
@@ -240,6 +274,8 @@ class Image {
|
|
|
240
274
|
if (!this.imageData)
|
|
241
275
|
throw new Error("No image loaded");
|
|
242
276
|
const { width, height, method = "bilinear" } = options;
|
|
277
|
+
// Validate new dimensions for security (prevent integer overflow and heap exhaustion)
|
|
278
|
+
(0, security_js_1.validateImageDimensions)(width, height);
|
|
243
279
|
const { data: srcData, width: srcWidth, height: srcHeight } = this.imageData;
|
|
244
280
|
let resizedData;
|
|
245
281
|
if (method === "nearest") {
|
|
@@ -268,12 +304,12 @@ class Image {
|
|
|
268
304
|
return this;
|
|
269
305
|
}
|
|
270
306
|
/**
|
|
271
|
-
*
|
|
307
|
+
* Encode the image to bytes in the specified format
|
|
272
308
|
* @param format Format name (e.g., "png", "jpeg", "webp", "ascii")
|
|
273
309
|
* @param options Optional format-specific encoding options
|
|
274
310
|
* @returns Encoded image bytes
|
|
275
311
|
*/
|
|
276
|
-
async
|
|
312
|
+
async encode(format, options) {
|
|
277
313
|
if (!this.imageData)
|
|
278
314
|
throw new Error("No image loaded");
|
|
279
315
|
const handler = Image.formats.find((f) => f.name === format);
|
|
@@ -282,6 +318,16 @@ class Image {
|
|
|
282
318
|
}
|
|
283
319
|
return await handler.encode(this.imageData, options);
|
|
284
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Save the image to bytes in the specified format
|
|
323
|
+
* @deprecated Use `encode()` instead. This method will be removed in a future version.
|
|
324
|
+
* @param format Format name (e.g., "png", "jpeg", "webp", "ascii")
|
|
325
|
+
* @param options Optional format-specific encoding options
|
|
326
|
+
* @returns Encoded image bytes
|
|
327
|
+
*/
|
|
328
|
+
save(format, options) {
|
|
329
|
+
return this.encode(format, options);
|
|
330
|
+
}
|
|
285
331
|
/**
|
|
286
332
|
* Clone this image
|
|
287
333
|
* @returns New image instance with copied data and metadata
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security utilities for image processing
|
|
3
|
+
* Prevents integer overflow, heap exhaustion, and decompression bombs
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Maximum safe image dimensions
|
|
7
|
+
* These limits prevent integer overflow and heap exhaustion attacks
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_IMAGE_DIMENSION = 65535;
|
|
10
|
+
export declare const MAX_IMAGE_PIXELS = 178956970;
|
|
11
|
+
/**
|
|
12
|
+
* Validates image dimensions to prevent security vulnerabilities
|
|
13
|
+
*
|
|
14
|
+
* @param width Image width in pixels
|
|
15
|
+
* @param height Image height in pixels
|
|
16
|
+
* @throws Error if dimensions are invalid or unsafe
|
|
17
|
+
*/
|
|
18
|
+
export declare function validateImageDimensions(width: number, height: number): void;
|
|
19
|
+
/**
|
|
20
|
+
* Safely calculates buffer size for RGBA image data
|
|
21
|
+
*
|
|
22
|
+
* @param width Image width in pixels
|
|
23
|
+
* @param height Image height in pixels
|
|
24
|
+
* @returns Buffer size in bytes (width * height * 4)
|
|
25
|
+
* @throws Error if calculation would overflow
|
|
26
|
+
*/
|
|
27
|
+
export declare function calculateBufferSize(width: number, height: number): number;
|
|
28
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Security utilities for image processing
|
|
4
|
+
* Prevents integer overflow, heap exhaustion, and decompression bombs
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MAX_IMAGE_PIXELS = exports.MAX_IMAGE_DIMENSION = void 0;
|
|
8
|
+
exports.validateImageDimensions = validateImageDimensions;
|
|
9
|
+
exports.calculateBufferSize = calculateBufferSize;
|
|
10
|
+
/**
|
|
11
|
+
* Maximum safe image dimensions
|
|
12
|
+
* These limits prevent integer overflow and heap exhaustion attacks
|
|
13
|
+
*/
|
|
14
|
+
exports.MAX_IMAGE_DIMENSION = 65535; // 2^16 - 1 (reasonable for most use cases)
|
|
15
|
+
exports.MAX_IMAGE_PIXELS = 178956970; // ~179 megapixels (fits safely in memory)
|
|
16
|
+
/**
|
|
17
|
+
* Validates image dimensions to prevent security vulnerabilities
|
|
18
|
+
*
|
|
19
|
+
* @param width Image width in pixels
|
|
20
|
+
* @param height Image height in pixels
|
|
21
|
+
* @throws Error if dimensions are invalid or unsafe
|
|
22
|
+
*/
|
|
23
|
+
function validateImageDimensions(width, height) {
|
|
24
|
+
// Check for negative or zero dimensions
|
|
25
|
+
if (width <= 0 || height <= 0) {
|
|
26
|
+
throw new Error(`Invalid image dimensions: ${width}x${height} (dimensions must be positive)`);
|
|
27
|
+
}
|
|
28
|
+
// Check if dimensions are integers
|
|
29
|
+
if (!Number.isInteger(width) || !Number.isInteger(height)) {
|
|
30
|
+
throw new Error(`Invalid image dimensions: ${width}x${height} (dimensions must be integers)`);
|
|
31
|
+
}
|
|
32
|
+
// Check individual dimension limits
|
|
33
|
+
if (width > exports.MAX_IMAGE_DIMENSION || height > exports.MAX_IMAGE_DIMENSION) {
|
|
34
|
+
throw new Error(`Image dimensions too large: ${width}x${height} (maximum ${exports.MAX_IMAGE_DIMENSION}x${exports.MAX_IMAGE_DIMENSION})`);
|
|
35
|
+
}
|
|
36
|
+
// Check total pixel count to prevent excessive memory allocation
|
|
37
|
+
const pixelCount = width * height;
|
|
38
|
+
if (pixelCount > exports.MAX_IMAGE_PIXELS) {
|
|
39
|
+
throw new Error(`Image size too large: ${width}x${height} (${pixelCount} pixels exceeds maximum ${exports.MAX_IMAGE_PIXELS})`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Safely calculates buffer size for RGBA image data
|
|
44
|
+
*
|
|
45
|
+
* @param width Image width in pixels
|
|
46
|
+
* @param height Image height in pixels
|
|
47
|
+
* @returns Buffer size in bytes (width * height * 4)
|
|
48
|
+
* @throws Error if calculation would overflow
|
|
49
|
+
*/
|
|
50
|
+
function calculateBufferSize(width, height) {
|
|
51
|
+
validateImageDimensions(width, height);
|
|
52
|
+
return width * height * 4;
|
|
53
|
+
}
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.WebPDecoder = void 0;
|
|
25
|
+
const security_js_1 = require("./security.js");
|
|
25
26
|
// Helper to read little-endian values
|
|
26
27
|
function readUint24LE(data, offset) {
|
|
27
28
|
return data[offset] | (data[offset + 1] << 8) | (data[offset + 2] << 16);
|
|
@@ -255,6 +256,8 @@ class WebPDecoder {
|
|
|
255
256
|
}
|
|
256
257
|
// Read Huffman codes
|
|
257
258
|
const huffmanTables = this.readHuffmanCodes(reader, useColorCache, colorCacheBits);
|
|
259
|
+
// Validate dimensions for security (prevent integer overflow and heap exhaustion)
|
|
260
|
+
(0, security_js_1.validateImageDimensions)(width, height);
|
|
258
261
|
// Decode the image using Huffman codes
|
|
259
262
|
const pixelData = new Uint8Array(width * height * 4);
|
|
260
263
|
let pixelIndex = 0;
|
package/esm/mod.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,YAAY,EACV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 @@
|
|
|
1
|
-
{"version":3,"file":"bmp.d.ts","sourceRoot":"","sources":["../../../src/src/formats/bmp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAKzE;;;GAGG;AACH,qBAAa,SAAU,YAAW,WAAW;IAC3C,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,QAAQ,eAAe;IAEhC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAMpC,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;IAwF5C,MAAM,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IA8DjD,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,YAAY;CAGrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gif.d.ts","sourceRoot":"","sources":["../../../src/src/formats/gif.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EAEX,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAIrB;;;;;;;;;;;GAWG;AACH,qBAAa,SAAU,YAAW,WAAW;IAC3C,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,QAAQ,eAAe;IAEhC,sBAAsB,IAAI,OAAO;IAIjC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAS9B,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;IA2ClD,OAAO,CAAC,eAAe;IAwDjB,MAAM,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IAyDvD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAkC5D;;;OAGG;IACH,YAAY,CACV,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,CAAC,EAAE,OAAO,GACjB,OAAO,CAAC,UAAU,CAAC;IAkBtB,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,YAAY;YAIN,kBAAkB;IAqChC,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,YAAY;IAmCpB,OAAO,CAAC,QAAQ;IAuBhB,OAAO,CAAC,cAAc;IAqDtB,OAAO,CAAC,iBAAiB;CAY1B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jpeg.d.ts","sourceRoot":"","sources":["../../../src/src/formats/jpeg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAKzE;;;GAGG;AACH,qBAAa,UAAW,YAAW,WAAW;IAC5C,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,QAAQ,gBAAgB;IAEjC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAM9B,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;IA2E5C,MAAM,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC;IAgDvD,OAAO,CAAC,cAAc;YA+CR,kBAAkB;IAgDhC,OAAO,CAAC,SAAS;IAkCjB,OAAO,CAAC,SAAS;IAyIjB,OAAO,CAAC,cAAc;CAgHvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"png.d.ts","sourceRoot":"","sources":["../../../src/src/formats/png.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAiB,MAAM,aAAa,CAAC;AAKzE;;;GAGG;AACH,qBAAa,SAAU,YAAW,WAAW;IAC3C,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,QAAQ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AC,YAAY;IAiHpB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;CAuG5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webp.d.ts","sourceRoot":"","sources":["../../../src/src/formats/webp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EAEX,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAKrB;;;GAGG;AACH,qBAAa,UAAW,YAAW,WAAW;IAC5C,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,QAAQ,gBAAgB;IAEjC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAS9B,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;IAmF5C,MAAM,CACV,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,UAAU,CAAC;IAsDtB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,YAAY;YAIN,kBAAkB;IAiDhC,OAAO,CAAC,SAAS;IA+DjB,OAAO,CAAC,QAAQ;IA6BhB,OAAO,CAAC,cAAc;IAuFtB,OAAO,CAAC,eAAe;IAyDvB,OAAO,CAAC,cAAc;IAoDtB,OAAO,CAAC,SAAS;CAQlB"}
|
package/esm/src/image.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/src/image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,aAAa,EACd,MAAM,YAAY,CAAC;AAWpB;;GAEG;AACH,qBAAa,KAAK;IAChB,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,MAAM,CAAC,OAAO,CASpB;IAEF;;OAEG;IACH,IAAI,KAAK,IAAI,MAAM,CAGlB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,MAAM,CAGnB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G;IACH,OAAO,CAAC,QAAQ;IA6GhB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,eAAe;IAQvB,MAAM,IAAI,UAAU;CA+ErB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jpeg_decoder.d.ts","sourceRoot":"","sources":["../../../src/src/utils/jpeg_decoder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkGH,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,eAAe,CAAa;IACpC,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,QAAQ,CAAa;gBAEjB,IAAI,EAAE,UAAU;IAI5B,MAAM,IAAI,UAAU;IAwDpB,OAAO,CAAC,UAAU;IAoBlB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,QAAQ;IAsBhB,OAAO,CAAC,QAAQ;IAgChB,OAAO,CAAC,iBAAiB;IA8BzB,OAAO,CAAC,QAAQ;IAmChB,OAAO,CAAC,QAAQ;IAkBhB,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,UAAU;IAiDlB,OAAO,CAAC,WAAW;IAiDnB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,OAAO;IA2Bf,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,IAAI;IAqCZ,OAAO,CAAC,YAAY;CAsGrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jpeg_encoder.d.ts","sourceRoot":"","sources":["../../../src/src/utils/jpeg_encoder.ts"],"names":[],"mappings":"AAAA;;;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AC,IAAI,CAAe;IAC3B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,QAAQ,CAAS;gBAEb,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;IAejD,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,QAAQ;IAqBhB,UAAU,IAAI,UAAU;CA0DzB;AAED;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,IAAI,CAAsB;IAClC,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAS;gBAEb,WAAW,EAAE,MAAM;IAa/B,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,SAAS;IAWjB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;CA4DvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../../src/src/utils/resize.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,UAAU,CAgCZ;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,UAAU,EACf,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,UAAU,CAoBZ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tiff_lzw.d.ts","sourceRoot":"","sources":["../../../src/src/utils/tiff_lzw.ts"],"names":[],"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