image-js 1.1.0 → 1.2.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/dist/image-js.esm.js +176 -48
- package/dist/image-js.esm.js.map +1 -1
- package/dist/image-js.esm.min.js +2 -2
- package/dist/image-js.esm.min.js.map +1 -1
- package/dist/image-js.umd.js +144 -14
- package/dist/image-js.umd.js.map +1 -1
- package/dist/image-js.umd.min.js +2 -2
- package/dist/image-js.umd.min.js.map +1 -1
- package/dist-types/image-js.d.ts +2 -2
- package/lib/draw/drawLineOnImage.d.ts.map +1 -1
- package/lib/draw/drawLineOnImage.js.map +1 -1
- package/lib/extra/draw/draw_text.d.ts +47 -0
- package/lib/extra/draw/draw_text.d.ts.map +1 -0
- package/lib/extra/draw/draw_text.js +108 -0
- package/lib/extra/draw/draw_text.js.map +1 -0
- package/lib/extra/draw/index.d.ts +3 -0
- package/lib/extra/draw/index.d.ts.map +1 -0
- package/lib/extra/draw/index.js +3 -0
- package/lib/extra/draw/index.js.map +1 -0
- package/lib/{ssim → extra/ssim}/compute_dssim.d.ts +2 -2
- package/lib/extra/ssim/compute_dssim.d.ts.map +1 -0
- package/lib/{ssim → extra/ssim}/compute_dssim.js +1 -1
- package/lib/extra/ssim/compute_dssim.js.map +1 -0
- package/lib/{ssim → extra/ssim}/compute_ssim.d.ts +1 -1
- package/lib/extra/ssim/compute_ssim.d.ts.map +1 -0
- package/lib/{ssim → extra/ssim}/compute_ssim.js +2 -2
- package/lib/extra/ssim/compute_ssim.js.map +1 -0
- package/lib/extra/ssim/index.d.ts +3 -0
- package/lib/extra/ssim/index.d.ts.map +1 -0
- package/lib/extra/ssim/index.js +3 -0
- package/lib/extra/ssim/index.js.map +1 -0
- package/lib/index_browser.d.ts +3 -0
- package/lib/index_browser.d.ts.map +1 -0
- package/lib/index_browser.js +5 -0
- package/lib/index_browser.js.map +1 -0
- package/lib/index_full.d.ts +4 -0
- package/lib/index_full.d.ts.map +1 -0
- package/lib/index_full.js +5 -0
- package/lib/index_full.js.map +1 -0
- package/lib/load/read.d.ts +1 -1
- package/lib/load/read.js +1 -1
- package/lib/save/write.d.ts +1 -1
- package/lib/save/write.js +1 -1
- package/lib/utils/cross_platform.d.ts +8 -0
- package/lib/utils/cross_platform.d.ts.map +1 -1
- package/lib/utils/cross_platform.js +34 -2
- package/lib/utils/cross_platform.js.map +1 -1
- package/lib/utils/setBlendedPixel.d.ts +1 -1
- package/lib/utils/setBlendedPixel.js +1 -1
- package/lib/utils/setBlendedVisiblePixel.d.ts +1 -1
- package/lib/utils/setBlendedVisiblePixel.js +1 -1
- package/package.json +17 -3
- package/src/draw/drawLineOnImage.ts +0 -1
- package/src/extra/draw/draw_text.ts +194 -0
- package/src/extra/draw/index.ts +2 -0
- package/src/{ssim → extra/ssim}/compute_dssim.ts +3 -3
- package/src/{ssim → extra/ssim}/compute_ssim.ts +3 -3
- package/src/extra/ssim/index.ts +2 -0
- package/src/index_browser.ts +4 -0
- package/src/index_full.ts +4 -0
- package/src/load/read.ts +1 -1
- package/src/save/write.ts +1 -1
- package/src/utils/cross_platform.ts +47 -4
- package/src/utils/setBlendedPixel.ts +1 -1
- package/src/utils/setBlendedVisiblePixel.ts +1 -1
- package/lib/ssim/compute_dssim.d.ts.map +0 -1
- package/lib/ssim/compute_dssim.js.map +0 -1
- package/lib/ssim/compute_ssim.d.ts.map +0 -1
- package/lib/ssim/compute_ssim.js.map +0 -1
- package/lib/ssim/index.d.ts +0 -3
- package/lib/ssim/index.d.ts.map +0 -1
- package/lib/ssim/index.js +0 -3
- package/lib/ssim/index.js.map +0 -1
- package/src/ssim/index.ts +0 -2
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import type { CanvasRenderingContext2D as SkiaCanvasRenderingContext2D } from 'skia-canvas';
|
|
2
|
+
|
|
3
|
+
import type { Image, ImageDataArray } from '../../Image.ts';
|
|
4
|
+
import type { Point } from '../../geometry/index.ts';
|
|
5
|
+
import { getCanvasContext } from '../../utils/cross_platform.ts';
|
|
6
|
+
import { getOutputImage } from '../../utils/getOutputImage.ts';
|
|
7
|
+
import { validateValues } from '../../utils/validators/validators.ts';
|
|
8
|
+
|
|
9
|
+
export interface DrawTextLabel {
|
|
10
|
+
/**
|
|
11
|
+
* Text of the label.
|
|
12
|
+
*/
|
|
13
|
+
content: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Position to draw the label at.
|
|
16
|
+
*/
|
|
17
|
+
position: Point;
|
|
18
|
+
/**
|
|
19
|
+
* Size and type of font.
|
|
20
|
+
* If specified, this overrides the general font from DrawTextOptions.
|
|
21
|
+
*/
|
|
22
|
+
font?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Font color. Should be in rgba8 format.
|
|
25
|
+
* If specified, this overrides the general fontColor from DrawTextOptions.
|
|
26
|
+
*/
|
|
27
|
+
fontColor?: number[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface DrawTextOptions {
|
|
31
|
+
/**
|
|
32
|
+
* General size and type of font.
|
|
33
|
+
* Used as the default when font is not specified in individual text labels.
|
|
34
|
+
*/
|
|
35
|
+
font?: string;
|
|
36
|
+
/**
|
|
37
|
+
* General font color.
|
|
38
|
+
* Used as the default when fontColor is not specified in individual text labels.
|
|
39
|
+
*/
|
|
40
|
+
fontColor?: number[];
|
|
41
|
+
/**
|
|
42
|
+
* Image to which the resulting image has to be put.
|
|
43
|
+
*/
|
|
44
|
+
out?: Image;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Draws text on an image.
|
|
49
|
+
* @param image - Image to write text on.
|
|
50
|
+
* @param text - Text to write on the image.
|
|
51
|
+
* @param options - Out Options
|
|
52
|
+
* @returns Image with drawn text.
|
|
53
|
+
*/
|
|
54
|
+
export function drawText(
|
|
55
|
+
image: Image,
|
|
56
|
+
text: DrawTextLabel | DrawTextLabel[],
|
|
57
|
+
options?: DrawTextOptions,
|
|
58
|
+
) {
|
|
59
|
+
if (Array.isArray(text) && text.length === 0) {
|
|
60
|
+
throw new Error('At least one text element must be provided');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const newImage = getOutputImage(image, options, { clone: true });
|
|
64
|
+
const defaultFont = options?.font ?? '12px Helvetica';
|
|
65
|
+
const defaultColor = options?.fontColor ?? [255, 255, 255, 255];
|
|
66
|
+
|
|
67
|
+
const ctx = getCanvasContext(image.width, image.height);
|
|
68
|
+
if (!Array.isArray(text)) {
|
|
69
|
+
drawTextElement(image, ctx, text, defaultFont, defaultColor);
|
|
70
|
+
} else {
|
|
71
|
+
for (const label of text) {
|
|
72
|
+
drawTextElement(image, ctx, label, defaultFont, defaultColor);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
layerCanvas(
|
|
77
|
+
newImage.getRawImage().data,
|
|
78
|
+
ctx.getImageData(0, 0, image.width, image.height).data,
|
|
79
|
+
image.channels,
|
|
80
|
+
image.bitDepth,
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
return newImage;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function drawTextElement(
|
|
87
|
+
image: Image,
|
|
88
|
+
ctx: OffscreenCanvasRenderingContext2D | SkiaCanvasRenderingContext2D,
|
|
89
|
+
text: DrawTextLabel,
|
|
90
|
+
defaultFont: string,
|
|
91
|
+
defaultColor: number[],
|
|
92
|
+
) {
|
|
93
|
+
ctx.font = text.font ?? defaultFont;
|
|
94
|
+
const fontColor = text.fontColor ?? defaultColor;
|
|
95
|
+
validateValues(fontColor, image);
|
|
96
|
+
const alpha = fontColor[3] ? fontColor[3] / 255 : 1;
|
|
97
|
+
const normalizedColor = [
|
|
98
|
+
fontColor[0] ?? 0,
|
|
99
|
+
fontColor[1] ?? 0,
|
|
100
|
+
fontColor[2] ?? 0,
|
|
101
|
+
alpha,
|
|
102
|
+
];
|
|
103
|
+
ctx.fillStyle = `rgba(${normalizedColor.join(',')})`;
|
|
104
|
+
ctx.fillText(String(text.content), text.position.column, text.position.row);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Draws labels on the image data from canvas.
|
|
109
|
+
* @param imageData - Image data to draw text on.
|
|
110
|
+
* @param canvasData - Canvas data to draw on the image.
|
|
111
|
+
* @param numberOfChannels - Number of channels of the initial image.
|
|
112
|
+
* @param bitDepth - Bit depth of the initial image.
|
|
113
|
+
*/
|
|
114
|
+
function layerCanvas(
|
|
115
|
+
imageData: ImageDataArray,
|
|
116
|
+
canvasData: Uint8ClampedArray,
|
|
117
|
+
numberOfChannels: number,
|
|
118
|
+
bitDepth: number,
|
|
119
|
+
) {
|
|
120
|
+
const config = CHANNEL_CONFIGS[numberOfChannels] || CHANNEL_CONFIGS[1];
|
|
121
|
+
const pixelCount = canvasData.length >>> 2;
|
|
122
|
+
const bitShift = bitDepth - 8;
|
|
123
|
+
|
|
124
|
+
let imageIndex = 0;
|
|
125
|
+
let canvasIndex = 0;
|
|
126
|
+
|
|
127
|
+
for (let pixel = 0; pixel < pixelCount; pixel++) {
|
|
128
|
+
const canvasAlpha = canvasData[canvasIndex + 3] / 255;
|
|
129
|
+
|
|
130
|
+
// Skip transparent canvas pixels completely
|
|
131
|
+
if (canvasAlpha === 0) {
|
|
132
|
+
imageIndex += numberOfChannels;
|
|
133
|
+
canvasIndex += 4;
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const invAlpha = 1 - canvasAlpha;
|
|
138
|
+
|
|
139
|
+
for (const channel of config.channelOffsets) {
|
|
140
|
+
const targetIndex = imageIndex + channel;
|
|
141
|
+
imageData[targetIndex] =
|
|
142
|
+
Math.round(
|
|
143
|
+
canvasData[canvasIndex + channel] * canvasAlpha +
|
|
144
|
+
imageData[targetIndex] * invAlpha,
|
|
145
|
+
) << bitShift;
|
|
146
|
+
}
|
|
147
|
+
if (config.hasAlpha) {
|
|
148
|
+
const alphaIndex = imageIndex + (config.alphaOffset as number);
|
|
149
|
+
const imageAlpha = (imageData[alphaIndex] >>> bitShift) / 255;
|
|
150
|
+
|
|
151
|
+
const newAlpha = canvasAlpha + imageAlpha * (1 - canvasAlpha);
|
|
152
|
+
imageData[alphaIndex] = Math.round(newAlpha * 255) << bitShift;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
imageIndex += numberOfChannels;
|
|
156
|
+
canvasIndex += 4;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Configuration for different channel numbers when layering canvas with onto destination image.
|
|
162
|
+
*/
|
|
163
|
+
interface ChannelConfig {
|
|
164
|
+
channelOffsets: number[];
|
|
165
|
+
hasAlpha: boolean;
|
|
166
|
+
alphaOffset: number | undefined; // Required when hasAlpha is true
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const CHANNEL_CONFIGS: Record<number, ChannelConfig> = {
|
|
170
|
+
// GREY
|
|
171
|
+
1: {
|
|
172
|
+
channelOffsets: [0],
|
|
173
|
+
hasAlpha: false,
|
|
174
|
+
alphaOffset: undefined,
|
|
175
|
+
},
|
|
176
|
+
// GREYA
|
|
177
|
+
2: {
|
|
178
|
+
channelOffsets: [0],
|
|
179
|
+
hasAlpha: true,
|
|
180
|
+
alphaOffset: 1,
|
|
181
|
+
},
|
|
182
|
+
3: {
|
|
183
|
+
// RGB
|
|
184
|
+
channelOffsets: [0, 1, 2],
|
|
185
|
+
hasAlpha: false,
|
|
186
|
+
alphaOffset: undefined,
|
|
187
|
+
},
|
|
188
|
+
4: {
|
|
189
|
+
// RGBA
|
|
190
|
+
channelOffsets: [0, 1, 2],
|
|
191
|
+
hasAlpha: true,
|
|
192
|
+
alphaOffset: 3,
|
|
193
|
+
},
|
|
194
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Image } from '
|
|
1
|
+
import type { Image } from '../../Image.ts';
|
|
2
2
|
|
|
3
|
-
import type { SsimOptions } from './compute_ssim.
|
|
4
|
-
import { computeSsim } from './compute_ssim.
|
|
3
|
+
import type { SsimOptions } from './compute_ssim.ts';
|
|
4
|
+
import { computeSsim } from './compute_ssim.ts';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Compute the Structural Dissimilarity (DSSIM) of two GREY images.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ssim as bufferSsim } from 'ssim.js';
|
|
2
2
|
|
|
3
|
-
import type { Image } from '
|
|
4
|
-
import checkProcessable from '
|
|
5
|
-
import { validateForComparison } from '
|
|
3
|
+
import type { Image } from '../../Image.ts';
|
|
4
|
+
import checkProcessable from '../../utils/validators/checkProcessable.ts';
|
|
5
|
+
import { validateForComparison } from '../../utils/validators/validators.ts';
|
|
6
6
|
|
|
7
7
|
export interface SsimOptions {
|
|
8
8
|
/**
|
package/src/load/read.ts
CHANGED
|
@@ -17,7 +17,7 @@ export async function read(path: string | URL): Promise<Image> {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* Synchronous version of
|
|
20
|
+
* Synchronous version of {@link read}.
|
|
21
21
|
* This method is only implemented for Node.js.
|
|
22
22
|
* @param path - The path to the image.
|
|
23
23
|
* @returns Image instance.
|
package/src/save/write.ts
CHANGED
|
@@ -106,7 +106,7 @@ export async function write(
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
|
-
* Synchronous version of
|
|
109
|
+
* Synchronous version of {@link write}.
|
|
110
110
|
* This method is only implemented for Node.js.
|
|
111
111
|
* @param path - Path where the image should be written.
|
|
112
112
|
* @param image - Image to save.
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Canvas as SkiaCanvas,
|
|
3
|
+
CanvasRenderingContext2D as SkiaCanvasRenderingContext2D,
|
|
4
|
+
} from 'skia-canvas';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Returns builtin Node.js modules or throws an error saying that the method is only implemented in Node.js.
|
|
3
8
|
* @param methodName - Name of the method that calls this function
|
|
4
9
|
* @returns - The `fs`, `path` and `url` Node.js modules.
|
|
5
10
|
*/
|
|
6
11
|
export function getNodeApiOrThrow(methodName: string) {
|
|
7
|
-
if (
|
|
8
|
-
typeof process === 'undefined' ||
|
|
9
|
-
typeof process.getBuiltinModule !== 'function'
|
|
10
|
-
) {
|
|
12
|
+
if (!isNode()) {
|
|
11
13
|
throw new Error(`${methodName} is only implemented for Node.js`);
|
|
12
14
|
}
|
|
13
15
|
return {
|
|
@@ -16,3 +18,44 @@ export function getNodeApiOrThrow(methodName: string) {
|
|
|
16
18
|
url: process.getBuiltinModule('node:url'),
|
|
17
19
|
};
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
let CanvasCtorBrowser: typeof OffscreenCanvas;
|
|
23
|
+
let CanvasCtorNode: typeof SkiaCanvas;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Returns a 2D canvas context for rendering on the browser or Node.js.
|
|
27
|
+
* @param width - Width of the canvas.
|
|
28
|
+
* @param height - Height of the canvas.
|
|
29
|
+
* @returns The initialised canvas context.
|
|
30
|
+
*/
|
|
31
|
+
export function getCanvasContext(
|
|
32
|
+
width: number,
|
|
33
|
+
height: number,
|
|
34
|
+
): OffscreenCanvasRenderingContext2D | SkiaCanvasRenderingContext2D {
|
|
35
|
+
if (isNode()) {
|
|
36
|
+
CanvasCtorNode ??= getRequireFn()('skia-canvas').Canvas;
|
|
37
|
+
return new CanvasCtorNode(width, height).getContext('2d');
|
|
38
|
+
} else {
|
|
39
|
+
CanvasCtorBrowser ??= globalThis.OffscreenCanvas;
|
|
40
|
+
const context = new CanvasCtorBrowser(width, height).getContext('2d');
|
|
41
|
+
if (!context) {
|
|
42
|
+
throw new Error('Failed to create canvas context');
|
|
43
|
+
}
|
|
44
|
+
return context;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function isNode() {
|
|
49
|
+
return (
|
|
50
|
+
typeof process !== 'undefined' &&
|
|
51
|
+
typeof process.getBuiltinModule === 'function'
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let requireFn: NodeJS.Require;
|
|
56
|
+
function getRequireFn() {
|
|
57
|
+
requireFn ??= process
|
|
58
|
+
.getBuiltinModule('node:module')
|
|
59
|
+
.createRequire(import.meta.url);
|
|
60
|
+
return requireFn;
|
|
61
|
+
}
|
|
@@ -9,7 +9,7 @@ import { assert } from './validators/assert.js';
|
|
|
9
9
|
* @param image - The image with which to blend.
|
|
10
10
|
* @param column - Column of the target pixel.
|
|
11
11
|
* @param row - Row of the target pixel.
|
|
12
|
-
* @param color - Color with which to blend the image pixel.
|
|
12
|
+
* @param color - Color with which to blend the image pixel. Default: `Opaque black`.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
export function setBlendedPixel(
|
|
@@ -8,7 +8,7 @@ import { setBlendedPixel } from './setBlendedPixel.js';
|
|
|
8
8
|
* @param image - The image with which to blend.
|
|
9
9
|
* @param column - Column of the target pixel.
|
|
10
10
|
* @param row - Row of the target pixel.
|
|
11
|
-
* @param color - Color with which to blend the image pixel.
|
|
11
|
+
* @param color - Color with which to blend the image pixel. Default: `Opaque black`.
|
|
12
12
|
*/
|
|
13
13
|
export function setBlendedVisiblePixel(
|
|
14
14
|
image: Image | Mask,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute_dssim.d.ts","sourceRoot":"","sources":["../../src/ssim/compute_dssim.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,KAAK,EACjB,OAAO,GAAE,WAAgB,GACxB,MAAM,CAGR"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute_dssim.js","sourceRoot":"","sources":["../../src/ssim/compute_dssim.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAY,EACZ,UAAiB,EACjB,UAAuB,EAAE;IAEzB,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC;IAC3D,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute_ssim.d.ts","sourceRoot":"","sources":["../../src/ssim/compute_ssim.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;CACzD;AAED,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,KAAK,EACjB,OAAO,GAAE,WAAgB,GACxB,IAAI,CA8CN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compute_ssim.js","sourceRoot":"","sources":["../../src/ssim/compute_ssim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAG7C,OAAO,gBAAgB,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AA4B1E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,WAAW,CACzB,KAAY,EACZ,UAAiB,EACjB,UAAuB,EAAE;IAEzB,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAC7B,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC;IAE3C,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,UAAU,GAAG,KAAK,CAAC,KAAK,IAAI,UAAU,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YAC1D,MAAM,IAAI,UAAU,CAAC,2CAA2C,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IACD,gBAAgB,CAAC,KAAK,EAAE;QACtB,QAAQ,EAAE,CAAC,CAAC,CAAC;QACb,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KACpB,CAAC,CAAC;IAEH,qBAAqB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEzC,IAAI,KAAK,CAAC,UAAU,KAAK,MAAM,EAAE,CAAC;QAChC,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACnC,UAAU,GAAG,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM,SAAS,GAAG,IAAI,iBAAiB,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,IAAI,EAAE,SAAS;KAChB,CAAC;IAEF,MAAM,SAAS,GAAG,IAAI,iBAAiB,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC;IACvE,MAAM,WAAW,GAAG;QAClB,MAAM,EAAE,UAAU,CAAC,MAAM;QACzB,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,IAAI,EAAE,SAAS;KAChB,CAAC;IAEF,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE;QAChD,UAAU;QACV,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,OAAO,EAAE,IAAI,CAAC,QAAQ;KACvB,CAAC;AACJ,CAAC"}
|
package/lib/ssim/index.d.ts
DELETED
package/lib/ssim/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssim/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
package/lib/ssim/index.js
DELETED
package/lib/ssim/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ssim/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
package/src/ssim/index.ts
DELETED