@imagemagick/magick-wasm 0.0.9 → 0.0.10
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/NOTICE +34 -2
- package/README.md +1 -1
- package/auto-threshold-method.d.ts +6 -0
- package/auto-threshold-method.js +10 -0
- package/magick-format.d.ts +3 -0
- package/magick-format.js +3 -0
- package/magick-geometry.js +29 -0
- package/magick-image.d.ts +18 -0
- package/magick-image.js +54 -0
- package/package.json +1 -1
- package/wasm/magick.js +2 -2
package/NOTICE
CHANGED
|
@@ -7,7 +7,7 @@ Licensed under the Apache License, Version 2.0.
|
|
|
7
7
|
|
|
8
8
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
9
9
|
|
|
10
|
-
[ ImageMagick 7.1.0-
|
|
10
|
+
[ ImageMagick 7.1.0-26 (2022-02-21) ] copyright:
|
|
11
11
|
|
|
12
12
|
Before we get to the text of the license, lets just review what the license says in simple terms:
|
|
13
13
|
|
|
@@ -49,7 +49,7 @@ Terms and Conditions for Use, Reproduction, and Distribution
|
|
|
49
49
|
|
|
50
50
|
The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow:
|
|
51
51
|
|
|
52
|
-
Copyright 1999
|
|
52
|
+
Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available.
|
|
53
53
|
|
|
54
54
|
1. Definitions.
|
|
55
55
|
|
|
@@ -113,6 +113,38 @@ To apply the ImageMagick License to your work, attach the following boilerplate
|
|
|
113
113
|
License for the specific language governing permissions and limitations
|
|
114
114
|
under the License.
|
|
115
115
|
|
|
116
|
+
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
117
|
+
|
|
118
|
+
[ aom 3.1.3 (2021-10-05) ] copyright:
|
|
119
|
+
|
|
120
|
+
Copyright (c) 2016, Alliance for Open Media. All rights reserved.
|
|
121
|
+
|
|
122
|
+
Redistribution and use in source and binary forms, with or without
|
|
123
|
+
modification, are permitted provided that the following conditions
|
|
124
|
+
are met:
|
|
125
|
+
|
|
126
|
+
1. Redistributions of source code must retain the above copyright
|
|
127
|
+
notice, this list of conditions and the following disclaimer.
|
|
128
|
+
|
|
129
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
130
|
+
notice, this list of conditions and the following disclaimer in
|
|
131
|
+
the documentation and/or other materials provided with the
|
|
132
|
+
distribution.
|
|
133
|
+
|
|
134
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
135
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
136
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
137
|
+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
138
|
+
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
139
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
140
|
+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
141
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
142
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
143
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
144
|
+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
145
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
146
|
+
|
|
147
|
+
|
|
116
148
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
117
149
|
|
|
118
150
|
[ exr 3.1.3 (2021-10-28) ] copyright:
|
package/README.md
CHANGED
|
@@ -14,4 +14,4 @@ For more information about ImageMagick go to: [http://www.imagemagick.org/](http
|
|
|
14
14
|
|
|
15
15
|
## Release notes
|
|
16
16
|
|
|
17
|
-
The release notes can be found on [GitHub](https://github.com/dlemstra/magick-wasm/releases/tag/0.0.
|
|
17
|
+
The release notes can be found on [GitHub](https://github.com/dlemstra/magick-wasm/releases/tag/0.0.10).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoThresholdMethod = void 0;
|
|
4
|
+
var AutoThresholdMethod;
|
|
5
|
+
(function (AutoThresholdMethod) {
|
|
6
|
+
AutoThresholdMethod[AutoThresholdMethod["Undefined"] = 0] = "Undefined";
|
|
7
|
+
AutoThresholdMethod[AutoThresholdMethod["Kapur"] = 1] = "Kapur";
|
|
8
|
+
AutoThresholdMethod[AutoThresholdMethod["OTSU"] = 2] = "OTSU";
|
|
9
|
+
AutoThresholdMethod[AutoThresholdMethod["Triangle"] = 3] = "Triangle";
|
|
10
|
+
})(AutoThresholdMethod = exports.AutoThresholdMethod || (exports.AutoThresholdMethod = {}));
|
package/magick-format.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ export declare enum MagickFormat {
|
|
|
69
69
|
Flv = "FLV",
|
|
70
70
|
Fractal = "FRACTAL",
|
|
71
71
|
Ftp = "FTP",
|
|
72
|
+
Ftxt = "FTXT",
|
|
72
73
|
Fts = "FTS",
|
|
73
74
|
G = "G",
|
|
74
75
|
G3 = "G3",
|
|
@@ -190,6 +191,7 @@ export declare enum MagickFormat {
|
|
|
190
191
|
Psd = "PSD",
|
|
191
192
|
Ptif = "PTIF",
|
|
192
193
|
Pwp = "PWP",
|
|
194
|
+
Qoi = "QOI",
|
|
193
195
|
R = "R",
|
|
194
196
|
RadialGradient = "RADIAL-GRADIENT",
|
|
195
197
|
Raf = "RAF",
|
|
@@ -216,6 +218,7 @@ export declare enum MagickFormat {
|
|
|
216
218
|
Sr2 = "SR2",
|
|
217
219
|
Srf = "SRF",
|
|
218
220
|
Stegano = "STEGANO",
|
|
221
|
+
StrImg = "STRIMG",
|
|
219
222
|
Sun = "SUN",
|
|
220
223
|
Svg = "SVG",
|
|
221
224
|
Svgz = "SVGZ",
|
package/magick-format.js
CHANGED
|
@@ -73,6 +73,7 @@ var MagickFormat;
|
|
|
73
73
|
MagickFormat["Flv"] = "FLV";
|
|
74
74
|
MagickFormat["Fractal"] = "FRACTAL";
|
|
75
75
|
MagickFormat["Ftp"] = "FTP";
|
|
76
|
+
MagickFormat["Ftxt"] = "FTXT";
|
|
76
77
|
MagickFormat["Fts"] = "FTS";
|
|
77
78
|
MagickFormat["G"] = "G";
|
|
78
79
|
MagickFormat["G3"] = "G3";
|
|
@@ -194,6 +195,7 @@ var MagickFormat;
|
|
|
194
195
|
MagickFormat["Psd"] = "PSD";
|
|
195
196
|
MagickFormat["Ptif"] = "PTIF";
|
|
196
197
|
MagickFormat["Pwp"] = "PWP";
|
|
198
|
+
MagickFormat["Qoi"] = "QOI";
|
|
197
199
|
MagickFormat["R"] = "R";
|
|
198
200
|
MagickFormat["RadialGradient"] = "RADIAL-GRADIENT";
|
|
199
201
|
MagickFormat["Raf"] = "RAF";
|
|
@@ -220,6 +222,7 @@ var MagickFormat;
|
|
|
220
222
|
MagickFormat["Sr2"] = "SR2";
|
|
221
223
|
MagickFormat["Srf"] = "SRF";
|
|
222
224
|
MagickFormat["Stegano"] = "STEGANO";
|
|
225
|
+
MagickFormat["StrImg"] = "STRIMG";
|
|
223
226
|
MagickFormat["Sun"] = "SUN";
|
|
224
227
|
MagickFormat["Svg"] = "SVG";
|
|
225
228
|
MagickFormat["Svgz"] = "SVGZ";
|
package/magick-geometry.js
CHANGED
|
@@ -109,6 +109,35 @@ class MagickGeometry {
|
|
|
109
109
|
result += '@';
|
|
110
110
|
return result;
|
|
111
111
|
}
|
|
112
|
+
static fromRectangle(rectangle) {
|
|
113
|
+
if (rectangle === 0)
|
|
114
|
+
throw new magick_error_1.MagickError('unable to allocate memory');
|
|
115
|
+
try {
|
|
116
|
+
const width = image_magick_1.ImageMagick._api._MagickRectangle_Width_Get(rectangle);
|
|
117
|
+
const height = image_magick_1.ImageMagick._api._MagickRectangle_Height_Get(rectangle);
|
|
118
|
+
const x = image_magick_1.ImageMagick._api._MagickRectangle_X_Get(rectangle);
|
|
119
|
+
const y = image_magick_1.ImageMagick._api._MagickRectangle_Y_Get(rectangle);
|
|
120
|
+
return new MagickGeometry(x, y, width, height);
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
image_magick_1.ImageMagick._api._MagickRectangle_Dispose(rectangle);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
toRectangle(func) {
|
|
127
|
+
const rectangle = image_magick_1.ImageMagick._api._MagickRectangle_Create();
|
|
128
|
+
if (rectangle === 0)
|
|
129
|
+
throw new magick_error_1.MagickError('unable to allocate memory');
|
|
130
|
+
try {
|
|
131
|
+
image_magick_1.ImageMagick._api._MagickRectangle_Width_Set(rectangle, this._width);
|
|
132
|
+
image_magick_1.ImageMagick._api._MagickRectangle_Height_Set(rectangle, this._height);
|
|
133
|
+
image_magick_1.ImageMagick._api._MagickRectangle_X_Set(rectangle, this._x);
|
|
134
|
+
image_magick_1.ImageMagick._api._MagickRectangle_Y_Set(rectangle, this._y);
|
|
135
|
+
func(rectangle);
|
|
136
|
+
}
|
|
137
|
+
finally {
|
|
138
|
+
image_magick_1.ImageMagick._api._MagickRectangle_Dispose(rectangle);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
112
141
|
initialize(instance, flags) {
|
|
113
142
|
this._width = image_magick_1.ImageMagick._api._MagickGeometry_Width_Get(instance);
|
|
114
143
|
this._height = image_magick_1.ImageMagick._api._MagickGeometry_Height_Get(instance);
|
package/magick-image.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AlphaOption } from './alpha-option';
|
|
2
|
+
import { AutoThresholdMethod } from './auto-threshold-method';
|
|
2
3
|
import { Channels } from './channels';
|
|
3
4
|
import { ColorSpace } from './color-space';
|
|
4
5
|
import { CompositeOperator } from './composite-operator';
|
|
@@ -34,12 +35,14 @@ export interface IMagickImage extends INativeInstance {
|
|
|
34
35
|
interpolate: PixelInterpolateMethod;
|
|
35
36
|
readonly height: number;
|
|
36
37
|
orientation: OrientationType;
|
|
38
|
+
page: MagickGeometry;
|
|
37
39
|
quality: number;
|
|
38
40
|
readonly signature: string | null;
|
|
39
41
|
virtualPixelMethod: VirtualPixelMethod;
|
|
40
42
|
width: number;
|
|
41
43
|
alpha(value: AlphaOption): void;
|
|
42
44
|
autoOrient(): void;
|
|
45
|
+
autoThreshold(method: AutoThresholdMethod): void;
|
|
43
46
|
blur(): void;
|
|
44
47
|
blur(channels: Channels): void;
|
|
45
48
|
blur(radius: number, sigma: number): void;
|
|
@@ -76,6 +79,10 @@ export interface IMagickImage extends INativeInstance {
|
|
|
76
79
|
compositeGravity(image: IMagickImage, gravity: Gravity, compose: CompositeOperator, point: Point, channels: Channels): void;
|
|
77
80
|
compositeGravity(image: IMagickImage, gravity: Gravity, compose: CompositeOperator, point: Point, args: string): void;
|
|
78
81
|
compositeGravity(image: IMagickImage, gravity: Gravity, compose: CompositeOperator, point: Point, args: string, channels: Channels): void;
|
|
82
|
+
crop(geometry: MagickGeometry): void;
|
|
83
|
+
crop(geometry: MagickGeometry, gravity: Gravity): void;
|
|
84
|
+
crop(width: number, height: number): void;
|
|
85
|
+
crop(width: number, height: number, gravity: Gravity): void;
|
|
79
86
|
deskew(threshold: Percentage): number;
|
|
80
87
|
distort(method: DistortMethod, params: number[]): void;
|
|
81
88
|
distort(method: DistortMethod, settings: DistortSettings, params: number[]): void;
|
|
@@ -95,6 +102,7 @@ export interface IMagickImage extends INativeInstance {
|
|
|
95
102
|
getWriteMask(func: (mask: IMagickImage | null) => void): void;
|
|
96
103
|
getWriteMask(func: (mask: IMagickImage | null) => Promise<void>): Promise<void>;
|
|
97
104
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType;
|
|
105
|
+
histogram(): Map<string, number>;
|
|
98
106
|
level(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
99
107
|
level(blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
100
108
|
level(channels: Channels, blackPoint: Percentage, whitePoint: Percentage): void;
|
|
@@ -112,6 +120,7 @@ export interface IMagickImage extends INativeInstance {
|
|
|
112
120
|
readFromCanvas(canvas: HTMLCanvasElement): void;
|
|
113
121
|
removeArtifact(name: string): void;
|
|
114
122
|
removeWriteMask(): void;
|
|
123
|
+
repage(): void;
|
|
115
124
|
resize(geometry: MagickGeometry): void;
|
|
116
125
|
resize(width: number, height: number): void;
|
|
117
126
|
rotate(degrees: number): void;
|
|
@@ -165,6 +174,8 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
165
174
|
get height(): number;
|
|
166
175
|
get orientation(): OrientationType;
|
|
167
176
|
set orientation(value: OrientationType);
|
|
177
|
+
get page(): MagickGeometry;
|
|
178
|
+
set page(value: MagickGeometry);
|
|
168
179
|
get quality(): number;
|
|
169
180
|
set quality(value: number);
|
|
170
181
|
get signature(): string | null;
|
|
@@ -173,6 +184,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
173
184
|
get width(): number;
|
|
174
185
|
alpha(value: AlphaOption): void;
|
|
175
186
|
autoOrient(): void;
|
|
187
|
+
autoThreshold(method: AutoThresholdMethod): void;
|
|
176
188
|
blur(): void;
|
|
177
189
|
blur(channels: Channels): void;
|
|
178
190
|
blur(radius: number, sigma: number): void;
|
|
@@ -209,6 +221,10 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
209
221
|
compositeGravity(image: IMagickImage, gravity: Gravity, compose: CompositeOperator, point: Point, channels: Channels): void;
|
|
210
222
|
compositeGravity(image: IMagickImage, gravity: Gravity, compose: CompositeOperator, point: Point, args: string): void;
|
|
211
223
|
compositeGravity(image: IMagickImage, gravity: Gravity, compose: CompositeOperator, point: Point, args: string, channels: Channels): void;
|
|
224
|
+
crop(geometry: MagickGeometry): void;
|
|
225
|
+
crop(geometry: MagickGeometry, gravity: Gravity): void;
|
|
226
|
+
crop(width: number, height: number): void;
|
|
227
|
+
crop(width: number, height: number, gravity: Gravity): void;
|
|
212
228
|
static create(): IMagickImage;
|
|
213
229
|
deskew(threshold: Percentage): number;
|
|
214
230
|
distort(method: DistortMethod, params: number[]): void;
|
|
@@ -229,6 +245,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
229
245
|
getWriteMask(func: (mask: IMagickImage | null) => void): void;
|
|
230
246
|
getWriteMask(func: (mask: IMagickImage | null) => Promise<void>): Promise<void>;
|
|
231
247
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType;
|
|
248
|
+
histogram(): Map<string, number>;
|
|
232
249
|
level(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
233
250
|
level(blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
234
251
|
level(channels: Channels, blackPoint: Percentage, whitePoint: Percentage): void;
|
|
@@ -246,6 +263,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
246
263
|
readFromCanvas(canvas: HTMLCanvasElement): void;
|
|
247
264
|
removeArtifact(name: string): void;
|
|
248
265
|
removeWriteMask(): void;
|
|
266
|
+
repage(): void;
|
|
249
267
|
resize(geometry: MagickGeometry): void;
|
|
250
268
|
resize(width: number, height: number): void;
|
|
251
269
|
rotate(degrees: number): void;
|
package/magick-image.js
CHANGED
|
@@ -90,6 +90,15 @@ class MagickImage extends native_instance_1.NativeInstance {
|
|
|
90
90
|
get height() { return image_magick_1.ImageMagick._api._MagickImage_Height_Get(this._instance); }
|
|
91
91
|
get orientation() { return image_magick_1.ImageMagick._api._MagickImage_Orientation_Get(this._instance); }
|
|
92
92
|
set orientation(value) { image_magick_1.ImageMagick._api._MagickImage_Orientation_Set(this._instance, value); }
|
|
93
|
+
get page() {
|
|
94
|
+
const rectangle = image_magick_1.ImageMagick._api._MagickImage_Page_Get(this._instance);
|
|
95
|
+
return magick_geometry_1.MagickGeometry.fromRectangle(rectangle);
|
|
96
|
+
}
|
|
97
|
+
set page(value) {
|
|
98
|
+
value.toRectangle(rectangle => {
|
|
99
|
+
image_magick_1.ImageMagick._api._MagickImage_Page_Set(this._instance, rectangle);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
93
102
|
get quality() { return image_magick_1.ImageMagick._api._MagickImage_Quality_Get(this._instance); }
|
|
94
103
|
set quality(value) {
|
|
95
104
|
let quality = value < 1 ? 1 : value;
|
|
@@ -124,6 +133,11 @@ class MagickImage extends native_instance_1.NativeInstance {
|
|
|
124
133
|
this._setInstance(instance, exception);
|
|
125
134
|
});
|
|
126
135
|
}
|
|
136
|
+
autoThreshold(method) {
|
|
137
|
+
exception_1.Exception.use(exception => {
|
|
138
|
+
image_magick_1.ImageMagick._api._MagickImage_AutoThreshold(this._instance, method, exception.ptr);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
127
141
|
blur(radiusOrChannel, sigma, channels) {
|
|
128
142
|
let radius = 0;
|
|
129
143
|
const sigmaValue = this.valueOrDefault(sigma, 1);
|
|
@@ -256,6 +270,24 @@ class MagickImage extends native_instance_1.NativeInstance {
|
|
|
256
270
|
if (args !== null)
|
|
257
271
|
this.removeArtifact('compose:args');
|
|
258
272
|
}
|
|
273
|
+
crop(geometryOrWidth, heightOrGravity, gravity) {
|
|
274
|
+
let geometry;
|
|
275
|
+
let cropGravity;
|
|
276
|
+
if (geometryOrWidth instanceof magick_geometry_1.MagickGeometry) {
|
|
277
|
+
geometry = geometryOrWidth;
|
|
278
|
+
cropGravity = heightOrGravity !== undefined ? heightOrGravity : gravity_1.Gravity.Undefined;
|
|
279
|
+
}
|
|
280
|
+
else if (heightOrGravity !== undefined) {
|
|
281
|
+
geometry = new magick_geometry_1.MagickGeometry(geometryOrWidth, heightOrGravity);
|
|
282
|
+
cropGravity = gravity !== undefined ? gravity : gravity_1.Gravity.Undefined;
|
|
283
|
+
}
|
|
284
|
+
exception_1.Exception.use(exception => {
|
|
285
|
+
(0, string_1._withString)(geometry.toString(), geometryPtr => {
|
|
286
|
+
const instance = image_magick_1.ImageMagick._api._MagickImage_Crop(this._instance, geometryPtr, cropGravity, exception.ptr);
|
|
287
|
+
this._setInstance(instance, exception);
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
}
|
|
259
291
|
static create() {
|
|
260
292
|
return new MagickImage(MagickImage.createInstance(), new magick_settings_1.MagickSettings());
|
|
261
293
|
}
|
|
@@ -364,6 +396,25 @@ class MagickImage extends native_instance_1.NativeInstance {
|
|
|
364
396
|
return func(pixels);
|
|
365
397
|
});
|
|
366
398
|
}
|
|
399
|
+
histogram() {
|
|
400
|
+
const result = new Map();
|
|
401
|
+
exception_1.Exception.usePointer(exception => {
|
|
402
|
+
pointer_1.Pointer.use(lengthPointer => {
|
|
403
|
+
const histogram = image_magick_1.ImageMagick._api._MagickImage_Histogram(this._instance, lengthPointer.ptr, exception);
|
|
404
|
+
if (histogram !== 0) {
|
|
405
|
+
const length = lengthPointer.value;
|
|
406
|
+
for (let i = 0; i < length; i++) {
|
|
407
|
+
const colorPtr = image_magick_1.ImageMagick._api._MagickColorCollection_GetInstance(histogram, i);
|
|
408
|
+
const color = magick_color_1.MagickColor._create(colorPtr);
|
|
409
|
+
const count = image_magick_1.ImageMagick._api._MagickColor_Count_Get(colorPtr);
|
|
410
|
+
result.set(color.toString(), count);
|
|
411
|
+
}
|
|
412
|
+
image_magick_1.ImageMagick._api._MagickColorCollection_DisposeList(histogram);
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
return result;
|
|
417
|
+
}
|
|
367
418
|
level(channelsOrBlackPoint, blackPointOrWhitePoint, whitePointPercentageOrGamma, gamma) {
|
|
368
419
|
let channels = channels_1.Channels.Composite;
|
|
369
420
|
let blackPoint;
|
|
@@ -458,6 +509,9 @@ class MagickImage extends native_instance_1.NativeInstance {
|
|
|
458
509
|
image_magick_1.ImageMagick._api._MagickImage_SetWriteMask(this._instance, 0, exception);
|
|
459
510
|
});
|
|
460
511
|
}
|
|
512
|
+
repage() {
|
|
513
|
+
this.page = new magick_geometry_1.MagickGeometry(0, 0, 0, 0);
|
|
514
|
+
}
|
|
461
515
|
resize(widthOrGeometry, height) {
|
|
462
516
|
const geometry = typeof widthOrGeometry === 'number' ? new magick_geometry_1.MagickGeometry(widthOrGeometry, height) : widthOrGeometry;
|
|
463
517
|
exception_1.Exception.use(exception => {
|