@imagemagick/magick-wasm 0.0.21 → 0.0.23
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 +44 -42
- package/README.md +1 -1
- package/dist/index.d.ts +198 -26
- package/dist/index.mjs +4234 -4061
- package/dist/index.umd.js +15 -15
- package/dist/magick.wasm +0 -0
- package/package.json +12 -11
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.1-
|
|
10
|
+
[ ImageMagick 7.1.1-13 (2023-07-16) ] 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
|
|
|
@@ -115,7 +115,7 @@ To apply the ImageMagick License to your work, attach the following boilerplate
|
|
|
115
115
|
|
|
116
116
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
117
117
|
|
|
118
|
-
[ aom 3.6.
|
|
118
|
+
[ aom 3.6.1 (2022-05-08) ] copyright:
|
|
119
119
|
|
|
120
120
|
Copyright (c) 2016, Alliance for Open Media. All rights reserved.
|
|
121
121
|
|
|
@@ -171,7 +171,7 @@ THE SOFTWARE.
|
|
|
171
171
|
|
|
172
172
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
173
173
|
|
|
174
|
-
[ de265 1.0.
|
|
174
|
+
[ de265 1.0.12 (2023-06-13) ] copyright:
|
|
175
175
|
|
|
176
176
|
* The library `libde265` is distributed under the terms of the GNU Lesser General Public License.
|
|
177
177
|
* The sample applications are distributed under the terms of the MIT license.
|
|
@@ -1047,35 +1047,37 @@ SOFTWARE.
|
|
|
1047
1047
|
|
|
1048
1048
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
1049
1049
|
|
|
1050
|
-
[
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1050
|
+
[ openexr 3.1.9 (2023-06-26) ] copyright:
|
|
1051
|
+
|
|
1052
|
+
<!-- SPDX-License-Identifier: BSD-3-Clause -->
|
|
1053
|
+
<!-- Copyright (c) Contributors to the OpenEXR Project -->
|
|
1054
|
+
|
|
1055
|
+
Copyright (c) Contributors to the OpenEXR Project. All rights reserved.
|
|
1056
|
+
|
|
1057
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
1058
|
+
|
|
1059
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
1060
|
+
|
|
1061
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
1062
|
+
|
|
1063
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
1064
|
+
|
|
1065
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1066
|
+
|
|
1067
|
+
[ imath 3.1.9 (2023-06-01) ] copyright:
|
|
1068
|
+
|
|
1069
|
+
Copyright Contributors to the OpenEXR Project. All rights reserved.
|
|
1070
|
+
|
|
1071
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
1072
|
+
|
|
1073
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
1074
|
+
|
|
1075
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
1076
|
+
|
|
1077
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
1078
|
+
|
|
1079
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1080
|
+
|
|
1079
1081
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
1080
1082
|
|
|
1081
1083
|
[ ffi 3.4.4 (2022-10-23) ] copyright:
|
|
@@ -1104,7 +1106,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
1104
1106
|
|
|
1105
1107
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
1106
1108
|
|
|
1107
|
-
[ freetype 2.13.
|
|
1109
|
+
[ freetype 2.13.1 (2023-06-24) ] copyright:
|
|
1108
1110
|
|
|
1109
1111
|
The FreeType Project LICENSE
|
|
1110
1112
|
----------------------------
|
|
@@ -1785,7 +1787,7 @@ That's all there is to it!
|
|
|
1785
1787
|
|
|
1786
1788
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
1787
1789
|
|
|
1788
|
-
[ heif 1.
|
|
1790
|
+
[ heif 1.16.2 (2023-05-22) ] copyright:
|
|
1789
1791
|
|
|
1790
1792
|
* The library `libheif` is distributed under the terms of the GNU Lesser General Public License.
|
|
1791
1793
|
* The sample applications are distributed under the terms of the MIT License.
|
|
@@ -2866,7 +2868,7 @@ SOFTWARE.
|
|
|
2866
2868
|
limitations under the License.
|
|
2867
2869
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
2868
2870
|
|
|
2869
|
-
[ jpeg-turbo
|
|
2871
|
+
[ jpeg-turbo 3.0.0 (2023-07-03) ] copyright:
|
|
2870
2872
|
|
|
2871
2873
|
libjpeg-turbo Licenses
|
|
2872
2874
|
======================
|
|
@@ -3003,7 +3005,7 @@ that were granted to the IJG for code derived from their software.
|
|
|
3003
3005
|
|
|
3004
3006
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
3005
3007
|
|
|
3006
|
-
[ jpeg-xl 0.8.
|
|
3008
|
+
[ jpeg-xl 0.8.2 (2023-06-14) ] copyright:
|
|
3007
3009
|
|
|
3008
3010
|
Copyright (c) the JPEG XL Project Authors.
|
|
3009
3011
|
All rights reserved.
|
|
@@ -3275,7 +3277,7 @@ Library.
|
|
|
3275
3277
|
|
|
3276
3278
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
3277
3279
|
|
|
3278
|
-
[ png 1.6.
|
|
3280
|
+
[ png 1.6.40 (2023-06-21) ] copyright:
|
|
3279
3281
|
|
|
3280
3282
|
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
|
3281
3283
|
=========================================
|
|
@@ -3283,8 +3285,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
|
|
3283
3285
|
PNG Reference Library License version 2
|
|
3284
3286
|
---------------------------------------
|
|
3285
3287
|
|
|
3286
|
-
* Copyright (c) 1995-
|
|
3287
|
-
* Copyright (c) 2018-
|
|
3288
|
+
* Copyright (c) 1995-2023 The PNG Reference Library Authors.
|
|
3289
|
+
* Copyright (c) 2018-2023 Cosmin Truta.
|
|
3288
3290
|
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
|
3289
3291
|
* Copyright (c) 1996-1997 Andreas Dilger.
|
|
3290
3292
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
|
@@ -3446,7 +3448,7 @@ Copyright (c) 2005 Adobe Systems Incorporated, licensed under MIT license
|
|
|
3446
3448
|
|
|
3447
3449
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
3448
3450
|
|
|
3449
|
-
[ tiff 4.5.
|
|
3451
|
+
[ tiff 4.5.1 (2023-06-10) ] copyright:
|
|
3450
3452
|
|
|
3451
3453
|
# LibTIFF license
|
|
3452
3454
|
|
|
@@ -3474,7 +3476,7 @@ OF THIS SOFTWARE.
|
|
|
3474
3476
|
|
|
3475
3477
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
3476
3478
|
|
|
3477
|
-
[ webp 1.3.
|
|
3479
|
+
[ webp 1.3.1 (2023-06-23) ] copyright:
|
|
3478
3480
|
|
|
3479
3481
|
Copyright (c) 2010, Google Inc. All rights reserved.
|
|
3480
3482
|
|
|
@@ -3509,7 +3511,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
3509
3511
|
|
|
3510
3512
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
3511
3513
|
|
|
3512
|
-
[ xml 2.
|
|
3514
|
+
[ xml 2.11.4 (2023-05-18) ] copyright:
|
|
3513
3515
|
|
|
3514
3516
|
Except where otherwise noted in the source code (e.g. the files hash.c,
|
|
3515
3517
|
list.c and the trio files, which are covered by a similar licence but
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Follow me on twitter([@MagickNET](https://twitter.com/MagickNET)) to receive inf
|
|
|
21
21
|
|
|
22
22
|
## Release notes
|
|
23
23
|
|
|
24
|
-
The release notes can be found on [GitHub](https://github.com/dlemstra/magick-wasm/releases/tag/0.0.
|
|
24
|
+
The release notes can be found on [GitHub](https://github.com/dlemstra/magick-wasm/releases/tag/0.0.23).
|
|
25
25
|
|
|
26
26
|
## Donate
|
|
27
27
|
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare enum AutoThresholdMethod {
|
|
|
24
24
|
OTSU = 2,
|
|
25
25
|
Triangle = 3
|
|
26
26
|
}
|
|
27
|
+
export type ByteArray = Int8Array | Uint8Array | Uint8ClampedArray;
|
|
27
28
|
export declare enum PixelChannel {
|
|
28
29
|
Red = 0,
|
|
29
30
|
Cyan = 0,
|
|
@@ -384,6 +385,7 @@ export declare enum MagickFormat {
|
|
|
384
385
|
Mpc = "MPC",
|
|
385
386
|
Mpeg = "MPEG",
|
|
386
387
|
Mpg = "MPG",
|
|
388
|
+
Mpo = "MPO",
|
|
387
389
|
Mrw = "MRW",
|
|
388
390
|
Msl = "MSL",
|
|
389
391
|
Msvg = "MSVG",
|
|
@@ -625,6 +627,19 @@ export declare enum PaintMethod {
|
|
|
625
627
|
FillToBorder = 4,
|
|
626
628
|
Reset = 5
|
|
627
629
|
}
|
|
630
|
+
export declare enum TextAlignment {
|
|
631
|
+
Undefined = 0,
|
|
632
|
+
Left = 1,
|
|
633
|
+
Center = 2,
|
|
634
|
+
Right = 3
|
|
635
|
+
}
|
|
636
|
+
export declare enum TextDecoration {
|
|
637
|
+
Undefined = 0,
|
|
638
|
+
None = 1,
|
|
639
|
+
Underline = 2,
|
|
640
|
+
Overline = 3,
|
|
641
|
+
LineThrough = 4
|
|
642
|
+
}
|
|
628
643
|
export interface IDrawingWand extends IDisposable {
|
|
629
644
|
color(x: number, y: number, paintMethod: number): void;
|
|
630
645
|
draw(drawables: IDrawable[]): void;
|
|
@@ -636,6 +651,13 @@ export interface IDrawingWand extends IDisposable {
|
|
|
636
651
|
rectangle(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number): void;
|
|
637
652
|
roundRectangle(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number, cornerWidth: number, cornerHeight: number): void;
|
|
638
653
|
text(x: number, y: number, value: string): void;
|
|
654
|
+
textAlignment(value: TextAlignment): void;
|
|
655
|
+
textAntialias(value: boolean): void;
|
|
656
|
+
textDecoration(value: TextDecoration): void;
|
|
657
|
+
textInterlineSpacing(value: number): void;
|
|
658
|
+
textInterwordspacing(value: number): void;
|
|
659
|
+
textKerning(value: number): void;
|
|
660
|
+
textUnderColor(value: MagickColor): void;
|
|
639
661
|
}
|
|
640
662
|
export declare class DrawingWand extends NativeInstance implements IDrawingWand {
|
|
641
663
|
private constructor();
|
|
@@ -649,6 +671,13 @@ export declare class DrawingWand extends NativeInstance implements IDrawingWand
|
|
|
649
671
|
rectangle(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number): void;
|
|
650
672
|
roundRectangle(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number, cornerWidth: number, cornerHeight: number): void;
|
|
651
673
|
text(x: number, y: number, value: string): void;
|
|
674
|
+
textAlignment(value: TextAlignment): void;
|
|
675
|
+
textAntialias(value: boolean): void;
|
|
676
|
+
textDecoration(value: TextDecoration): void;
|
|
677
|
+
textInterlineSpacing(value: number): void;
|
|
678
|
+
textInterwordspacing(value: number): void;
|
|
679
|
+
textKerning(value: number): void;
|
|
680
|
+
textUnderColor(value: MagickColor): void;
|
|
652
681
|
}
|
|
653
682
|
export interface IDrawable {
|
|
654
683
|
draw(wand: IDrawingWand): void;
|
|
@@ -710,6 +739,43 @@ export declare class DrawableRoundRectangle implements IDrawable {
|
|
|
710
739
|
constructor(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number, cornerWidth: number, cornerHeight: number);
|
|
711
740
|
draw(wand: IDrawingWand): void;
|
|
712
741
|
}
|
|
742
|
+
export declare class DrawableTextAlignment implements IDrawable {
|
|
743
|
+
private readonly _alignment;
|
|
744
|
+
constructor(alignment: TextAlignment);
|
|
745
|
+
draw(wand: IDrawingWand): void;
|
|
746
|
+
}
|
|
747
|
+
export declare class DrawableTextAntialias implements IDrawable {
|
|
748
|
+
private readonly _isEnabled;
|
|
749
|
+
private constructor();
|
|
750
|
+
static get Disabled(): DrawableTextAntialias;
|
|
751
|
+
static get Enabled(): DrawableTextAntialias;
|
|
752
|
+
draw(wand: IDrawingWand): void;
|
|
753
|
+
}
|
|
754
|
+
export declare class DrawableTextDecoration implements IDrawable {
|
|
755
|
+
private readonly _decoration;
|
|
756
|
+
constructor(decoration: TextDecoration);
|
|
757
|
+
draw(wand: IDrawingWand): void;
|
|
758
|
+
}
|
|
759
|
+
export declare class DrawableTextInterlineSpacing implements IDrawable {
|
|
760
|
+
private readonly _spacing;
|
|
761
|
+
constructor(spacing: number);
|
|
762
|
+
draw(wand: IDrawingWand): void;
|
|
763
|
+
}
|
|
764
|
+
export declare class DrawableTextInterwordSpacing implements IDrawable {
|
|
765
|
+
private readonly _spacing;
|
|
766
|
+
constructor(spacing: number);
|
|
767
|
+
draw(wand: IDrawingWand): void;
|
|
768
|
+
}
|
|
769
|
+
export declare class DrawableTextKerning implements IDrawable {
|
|
770
|
+
private readonly _kerning;
|
|
771
|
+
constructor(kerning: number);
|
|
772
|
+
draw(wand: IDrawingWand): void;
|
|
773
|
+
}
|
|
774
|
+
export declare class DrawableTextUnderColor implements IDrawable {
|
|
775
|
+
private readonly _color;
|
|
776
|
+
constructor(color: MagickColor);
|
|
777
|
+
draw(wand: IDrawingWand): void;
|
|
778
|
+
}
|
|
713
779
|
export declare class DrawableText implements IDrawable {
|
|
714
780
|
private readonly _x;
|
|
715
781
|
private readonly _y;
|
|
@@ -717,6 +783,11 @@ export declare class DrawableText implements IDrawable {
|
|
|
717
783
|
constructor(x: number, y: number, value: string);
|
|
718
784
|
draw(wand: IDrawingWand): void;
|
|
719
785
|
}
|
|
786
|
+
export declare enum Endian {
|
|
787
|
+
Undefined = 0,
|
|
788
|
+
LSB = 1,
|
|
789
|
+
MSB = 2
|
|
790
|
+
}
|
|
720
791
|
export declare enum ErrorMetric {
|
|
721
792
|
Undefined = 0,
|
|
722
793
|
Absolute = 1,
|
|
@@ -820,6 +891,12 @@ export declare class DngReadDefines extends DefinesCreator {
|
|
|
820
891
|
getDefines(): IDefine[];
|
|
821
892
|
private hasValue;
|
|
822
893
|
}
|
|
894
|
+
export declare enum GifDisposeMethod {
|
|
895
|
+
Undefined = 0,
|
|
896
|
+
None = 1,
|
|
897
|
+
Background = 2,
|
|
898
|
+
Previous = 3
|
|
899
|
+
}
|
|
823
900
|
export declare class MagickGeometry {
|
|
824
901
|
private _width;
|
|
825
902
|
private _height;
|
|
@@ -879,13 +956,30 @@ export declare class ImageProfile implements IImageProfile {
|
|
|
879
956
|
readonly name: string;
|
|
880
957
|
getData(): Uint8Array;
|
|
881
958
|
}
|
|
959
|
+
export declare enum Interlace {
|
|
960
|
+
Undefined = 0,
|
|
961
|
+
NoInterlace = 1,
|
|
962
|
+
Line = 2,
|
|
963
|
+
Plane = 3,
|
|
964
|
+
Partition = 4,
|
|
965
|
+
Gif = 5,
|
|
966
|
+
Jpeg = 6,
|
|
967
|
+
Png = 7
|
|
968
|
+
}
|
|
882
969
|
export declare class MagickSettings {
|
|
970
|
+
antiAlias?: boolean;
|
|
883
971
|
backgroundColor?: MagickColor;
|
|
972
|
+
colorSpace?: ColorSpace;
|
|
884
973
|
colorType?: ColorType;
|
|
974
|
+
compression?: CompressionMethod;
|
|
975
|
+
debug?: boolean;
|
|
976
|
+
depth?: number;
|
|
977
|
+
endian?: Endian;
|
|
885
978
|
fillColor?: MagickColor;
|
|
886
979
|
font?: string;
|
|
887
980
|
fontPointsize?: number;
|
|
888
981
|
format?: MagickFormat;
|
|
982
|
+
interlace?: Interlace;
|
|
889
983
|
strokeColor?: MagickColor;
|
|
890
984
|
strokeWidth?: number;
|
|
891
985
|
textInterlineSpacing?: number;
|
|
@@ -941,9 +1035,11 @@ export interface IMagickImageCollection extends Array<IMagickImage>, IDisposable
|
|
|
941
1035
|
mosaic<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
942
1036
|
mosaic<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
943
1037
|
read(fileName: string, settings?: MagickReadSettings): void;
|
|
944
|
-
read(array:
|
|
945
|
-
write<TReturnType>(func: (data: Uint8Array) => TReturnType
|
|
946
|
-
write<TReturnType>(func: (data: Uint8Array) =>
|
|
1038
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1039
|
+
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1040
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1041
|
+
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1042
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
947
1043
|
}
|
|
948
1044
|
export declare class MagickImageCollection extends Array<MagickImage> implements IMagickImageCollection {
|
|
949
1045
|
private constructor();
|
|
@@ -965,10 +1061,13 @@ export declare class MagickImageCollection extends Array<MagickImage> implements
|
|
|
965
1061
|
mosaic<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
966
1062
|
mosaic<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
967
1063
|
read(fileName: string, settings?: MagickReadSettings): void;
|
|
968
|
-
read(array:
|
|
969
|
-
write<TReturnType>(func: (data: Uint8Array) => TReturnType
|
|
970
|
-
write<TReturnType>(func: (data: Uint8Array) =>
|
|
1064
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1065
|
+
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1066
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1067
|
+
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1068
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
971
1069
|
static create(): IMagickImageCollection;
|
|
1070
|
+
static create(array: ByteArray): IMagickImageCollection;
|
|
972
1071
|
private addImages;
|
|
973
1072
|
private attachImages;
|
|
974
1073
|
private static createObject;
|
|
@@ -1014,6 +1113,18 @@ export declare class PixelCollection extends NativeInstance implements IPixelCol
|
|
|
1014
1113
|
private static createArray;
|
|
1015
1114
|
private use;
|
|
1016
1115
|
}
|
|
1116
|
+
export declare enum PixelIntensityMethod {
|
|
1117
|
+
Undefined = 0,
|
|
1118
|
+
Average = 1,
|
|
1119
|
+
Brightness = 2,
|
|
1120
|
+
Lightness = 3,
|
|
1121
|
+
MS = 4,
|
|
1122
|
+
Rec601Luma = 5,
|
|
1123
|
+
Rec601Luminance = 6,
|
|
1124
|
+
Rec709Luma = 7,
|
|
1125
|
+
Rec709Luminance = 8,
|
|
1126
|
+
RMS = 9
|
|
1127
|
+
}
|
|
1017
1128
|
export declare enum PixelInterpolateMethod {
|
|
1018
1129
|
Undefined = 0,
|
|
1019
1130
|
Average = 1,
|
|
@@ -1087,11 +1198,16 @@ export interface IMagickImage extends IDisposable {
|
|
|
1087
1198
|
readonly compression: CompressionMethod;
|
|
1088
1199
|
density: Density;
|
|
1089
1200
|
depth: number;
|
|
1201
|
+
endian: Endian;
|
|
1202
|
+
readonly fileName: string | null;
|
|
1090
1203
|
filterType: FilterType;
|
|
1091
1204
|
format: MagickFormat;
|
|
1205
|
+
gamma: number;
|
|
1206
|
+
gifDisposeMethod: GifDisposeMethod;
|
|
1092
1207
|
hasAlpha: boolean;
|
|
1093
1208
|
readonly height: number;
|
|
1094
1209
|
interpolate: PixelInterpolateMethod;
|
|
1210
|
+
readonly interlace: Interlace;
|
|
1095
1211
|
label: string | null;
|
|
1096
1212
|
orientation: OrientationType;
|
|
1097
1213
|
page: MagickGeometry;
|
|
@@ -1177,6 +1293,8 @@ export interface IMagickImage extends IDisposable {
|
|
|
1177
1293
|
getWriteMask<TReturnType>(func: (mask: IMagickImage | null) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1178
1294
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType;
|
|
1179
1295
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1296
|
+
grayscale(): void;
|
|
1297
|
+
grayscale(method: PixelIntensityMethod): void;
|
|
1180
1298
|
histogram(): Map<string, number>;
|
|
1181
1299
|
inverseContrast(): void;
|
|
1182
1300
|
inverseOpaque(target: MagickColor, fill: MagickColor): void;
|
|
@@ -1204,13 +1322,14 @@ export interface IMagickImage extends IDisposable {
|
|
|
1204
1322
|
oilPaint(radius: number): void;
|
|
1205
1323
|
opaque(target: MagickColor, fill: MagickColor): void;
|
|
1206
1324
|
ping(fileName: string, settings?: MagickReadSettings): void;
|
|
1207
|
-
ping(array:
|
|
1325
|
+
ping(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1208
1326
|
read(color: MagickColor, width: number, height: number): void;
|
|
1209
1327
|
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1210
|
-
read(array:
|
|
1328
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1211
1329
|
readFromCanvas(canvas: HTMLCanvasElement): void;
|
|
1212
1330
|
removeArtifact(name: string): void;
|
|
1213
1331
|
removeAttribute(name: string): void;
|
|
1332
|
+
removeProfile(name: string): void;
|
|
1214
1333
|
removeWriteMask(): void;
|
|
1215
1334
|
repage(): void;
|
|
1216
1335
|
resize(geometry: MagickGeometry): void;
|
|
@@ -1220,9 +1339,13 @@ export interface IMagickImage extends IDisposable {
|
|
|
1220
1339
|
separate<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1221
1340
|
separate<TReturnType>(func: (images: IMagickImageCollection) => TReturnType, channels: Channels): TReturnType;
|
|
1222
1341
|
separate<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>, channels: Channels): Promise<TReturnType>;
|
|
1342
|
+
sepiaTone(): void;
|
|
1343
|
+
sepiaTone(threshold: number): void;
|
|
1344
|
+
sepiaTone(threshold: Percentage): void;
|
|
1223
1345
|
setArtifact(name: string, value: string): void;
|
|
1224
1346
|
setArtifact(name: string, value: boolean): void;
|
|
1225
1347
|
setAttribute(name: string, value: string): void;
|
|
1348
|
+
setProfile(name: string, data: ByteArray): void;
|
|
1226
1349
|
setWriteMask(image: IMagickImage): void;
|
|
1227
1350
|
sharpen(): void;
|
|
1228
1351
|
sharpen(radius: number, sigma: number): void;
|
|
@@ -1233,6 +1356,9 @@ export interface IMagickImage extends IDisposable {
|
|
|
1233
1356
|
sigmoidalContrast(contrast: number, midpoint: number): void;
|
|
1234
1357
|
sigmoidalContrast(contrast: number, midpoint: number, channels: Channels): void;
|
|
1235
1358
|
splice(geometry: MagickGeometry): void;
|
|
1359
|
+
solarize(): void;
|
|
1360
|
+
solarize(factor: number): void;
|
|
1361
|
+
solarize(factor: Percentage): void;
|
|
1236
1362
|
statistics(): IStatistics;
|
|
1237
1363
|
statistics(channels: Channels): IStatistics;
|
|
1238
1364
|
strip(): void;
|
|
@@ -1294,13 +1420,20 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1294
1420
|
set density(value: Density);
|
|
1295
1421
|
get depth(): number;
|
|
1296
1422
|
set depth(value: number);
|
|
1423
|
+
get endian(): number;
|
|
1424
|
+
set endian(value: number);
|
|
1425
|
+
get fileName(): string | null;
|
|
1297
1426
|
get filterType(): number;
|
|
1298
1427
|
set filterType(value: number);
|
|
1299
1428
|
get format(): MagickFormat;
|
|
1300
1429
|
set format(value: MagickFormat);
|
|
1430
|
+
get gamma(): number;
|
|
1431
|
+
get gifDisposeMethod(): GifDisposeMethod;
|
|
1432
|
+
set gifDisposeMethod(value: GifDisposeMethod);
|
|
1301
1433
|
get hasAlpha(): boolean;
|
|
1302
1434
|
set hasAlpha(value: boolean);
|
|
1303
1435
|
get height(): number;
|
|
1436
|
+
get interlace(): Interlace;
|
|
1304
1437
|
get interpolate(): PixelInterpolateMethod;
|
|
1305
1438
|
set interpolate(value: PixelInterpolateMethod);
|
|
1306
1439
|
get label(): string | null;
|
|
@@ -1365,7 +1498,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1365
1498
|
static create(): IMagickImage;
|
|
1366
1499
|
static create(color: MagickColor, width: number, height: number): IMagickImage;
|
|
1367
1500
|
static create(fileName: string, settings?: MagickReadSettings): IMagickImage;
|
|
1368
|
-
static create(array:
|
|
1501
|
+
static create(array: ByteArray, settings?: MagickReadSettings): IMagickImage;
|
|
1369
1502
|
crop(geometry: MagickGeometry): void;
|
|
1370
1503
|
crop(geometry: MagickGeometry, gravity: Gravity): void;
|
|
1371
1504
|
crop(width: number, height: number): void;
|
|
@@ -1396,6 +1529,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1396
1529
|
getWriteMask<TReturnType>(func: (mask: IMagickImage | null) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1397
1530
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType;
|
|
1398
1531
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1532
|
+
grayscale(method?: PixelIntensityMethod): void;
|
|
1399
1533
|
histogram(): Map<string, number>;
|
|
1400
1534
|
inverseContrast: () => void;
|
|
1401
1535
|
inverseOpaque: (target: MagickColor, fill: MagickColor) => void;
|
|
@@ -1421,13 +1555,14 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1421
1555
|
oilPaint(radius: number): void;
|
|
1422
1556
|
opaque: (target: MagickColor, fill: MagickColor) => void;
|
|
1423
1557
|
ping(fileName: string, settings?: MagickReadSettings): void;
|
|
1424
|
-
ping(array:
|
|
1558
|
+
ping(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1425
1559
|
read(color: MagickColor, width: number, height: number): void;
|
|
1426
1560
|
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1427
|
-
read(array:
|
|
1561
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1428
1562
|
readFromCanvas(canvas: HTMLCanvasElement): void;
|
|
1429
1563
|
removeArtifact(name: string): void;
|
|
1430
1564
|
removeAttribute(name: string): void;
|
|
1565
|
+
removeProfile(name: string): void;
|
|
1431
1566
|
removeWriteMask(): void;
|
|
1432
1567
|
repage(): void;
|
|
1433
1568
|
resize(geometry: MagickGeometry): void;
|
|
@@ -1437,9 +1572,11 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1437
1572
|
separate<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1438
1573
|
separate<TReturnType>(func: (images: IMagickImageCollection) => TReturnType, channels: Channels): TReturnType;
|
|
1439
1574
|
separate<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>, channels: Channels): Promise<TReturnType>;
|
|
1575
|
+
sepiaTone(): void;
|
|
1440
1576
|
setArtifact(name: string, value: string): void;
|
|
1441
1577
|
setArtifact(name: string, value: boolean): void;
|
|
1442
1578
|
setAttribute(name: string, value: string): void;
|
|
1579
|
+
setProfile(name: string, data: ByteArray): void;
|
|
1443
1580
|
setWriteMask(image: IMagickImage): void;
|
|
1444
1581
|
sharpen(): void;
|
|
1445
1582
|
sharpen(radius: number, sigma: number): void;
|
|
@@ -1449,6 +1586,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1449
1586
|
sigmoidalContrast(contrast: number, midpointPercentage: Percentage): void;
|
|
1450
1587
|
sigmoidalContrast(contrast: number, midpoint: number): void;
|
|
1451
1588
|
sigmoidalContrast(contrast: number, midpoint: number, channels: Channels): void;
|
|
1589
|
+
solarize(): void;
|
|
1452
1590
|
splice(geometry: MagickGeometry): void;
|
|
1453
1591
|
statistics(): IStatistics;
|
|
1454
1592
|
statistics(channels: Channels): IStatistics;
|
|
@@ -1485,26 +1623,26 @@ export declare class ImageMagick {
|
|
|
1485
1623
|
static _create: () => ImageMagick;
|
|
1486
1624
|
static read<TReturnType>(color: MagickColor, width: number, height: number, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1487
1625
|
static read<TReturnType>(color: MagickColor, width: number, height: number, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1488
|
-
static read<TReturnType>(array:
|
|
1489
|
-
static read<TReturnType>(array:
|
|
1490
|
-
static read<TReturnType>(array:
|
|
1491
|
-
static read<TReturnType>(array:
|
|
1492
|
-
static read<TReturnType>(array:
|
|
1493
|
-
static read<TReturnType>(array:
|
|
1626
|
+
static read<TReturnType>(array: ByteArray, format: MagickFormat, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1627
|
+
static read<TReturnType>(array: ByteArray, format: MagickFormat, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1628
|
+
static read<TReturnType>(array: ByteArray, settings: MagickReadSettings, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1629
|
+
static read<TReturnType>(array: ByteArray, settings: MagickReadSettings, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1630
|
+
static read<TReturnType>(array: ByteArray, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1631
|
+
static read<TReturnType>(array: ByteArray, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1494
1632
|
static read<TReturnType>(fileName: string, format: MagickFormat, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1495
1633
|
static read<TReturnType>(fileName: string, format: MagickFormat, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1496
1634
|
static read<TReturnType>(fileName: string, settings: MagickReadSettings, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1497
1635
|
static read<TReturnType>(fileName: string, settings: MagickReadSettings, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1498
1636
|
static read<TReturnType>(fileName: string, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1499
1637
|
static read<TReturnType>(fileName: string, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1500
|
-
static readCollection<TReturnType>(array:
|
|
1501
|
-
static readCollection<TReturnType>(array:
|
|
1502
|
-
static readCollection<TReturnType>(array:
|
|
1503
|
-
static readCollection<TReturnType>(array:
|
|
1504
|
-
static readCollection<TReturnType>(array:
|
|
1505
|
-
static readCollection<TReturnType>(array:
|
|
1506
|
-
static readCollection<TReturnType>(array:
|
|
1507
|
-
static readCollection<TReturnType>(array:
|
|
1638
|
+
static readCollection<TReturnType>(array: ByteArray, format: MagickFormat, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1639
|
+
static readCollection<TReturnType>(array: ByteArray, format: MagickFormat, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1640
|
+
static readCollection<TReturnType>(array: ByteArray, settings: MagickReadSettings, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1641
|
+
static readCollection<TReturnType>(array: ByteArray, settings: MagickReadSettings, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1642
|
+
static readCollection<TReturnType>(array: ByteArray, settings: MagickReadSettings, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1643
|
+
static readCollection<TReturnType>(array: ByteArray, settings: MagickReadSettings, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1644
|
+
static readCollection<TReturnType>(array: ByteArray, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1645
|
+
static readCollection<TReturnType>(array: ByteArray, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1508
1646
|
static readCollection<TReturnType>(fileName: string, settings: MagickReadSettings, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1509
1647
|
static readCollection<TReturnType>(fileName: string, settings: MagickReadSettings, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1510
1648
|
static readCollection<TReturnType>(fileName: string, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
@@ -1512,7 +1650,36 @@ export declare class ImageMagick {
|
|
|
1512
1650
|
static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1513
1651
|
static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1514
1652
|
}
|
|
1515
|
-
export declare function initializeImageMagick(
|
|
1653
|
+
export declare function initializeImageMagick(wasmLocationOrData?: string | ByteArray): Promise<void>;
|
|
1654
|
+
export declare enum LogEventTypes {
|
|
1655
|
+
None = 0,
|
|
1656
|
+
Accelerate = 1,
|
|
1657
|
+
Annotate = 2,
|
|
1658
|
+
Blob = 4,
|
|
1659
|
+
Cache = 8,
|
|
1660
|
+
Coder = 16,
|
|
1661
|
+
Configure = 32,
|
|
1662
|
+
Deprecate = 64,
|
|
1663
|
+
Draw = 128,
|
|
1664
|
+
Exception = 256,
|
|
1665
|
+
Image = 512,
|
|
1666
|
+
Locale = 1024,
|
|
1667
|
+
Module = 2048,
|
|
1668
|
+
Pixel = 4096,
|
|
1669
|
+
Policy = 8192,
|
|
1670
|
+
Resource = 16384,
|
|
1671
|
+
Trace = 32768,
|
|
1672
|
+
Transform = 65536,
|
|
1673
|
+
User = 131072,
|
|
1674
|
+
Wand = 262144,
|
|
1675
|
+
Detailed = 2147450879,
|
|
1676
|
+
All = 2147483647
|
|
1677
|
+
}
|
|
1678
|
+
export declare class LogEvent {
|
|
1679
|
+
eventType: LogEventTypes;
|
|
1680
|
+
message: string;
|
|
1681
|
+
constructor(eventType: LogEventTypes, message?: string);
|
|
1682
|
+
}
|
|
1516
1683
|
export declare class MagickColors {
|
|
1517
1684
|
static get None(): MagickColor;
|
|
1518
1685
|
static get Transparent(): MagickColor;
|
|
@@ -1708,12 +1875,17 @@ export declare class MagickFormatInfo {
|
|
|
1708
1875
|
private static convertFormat;
|
|
1709
1876
|
}
|
|
1710
1877
|
export declare class Magick {
|
|
1878
|
+
private static _logDelegate?;
|
|
1711
1879
|
static get delegates(): string;
|
|
1712
1880
|
static get features(): string;
|
|
1713
1881
|
static get imageMagickVersion(): string;
|
|
1714
1882
|
static get supportedFormats(): ReadonlyArray<MagickFormatInfo>;
|
|
1883
|
+
static onLog?: (event: LogEvent) => void;
|
|
1715
1884
|
static addFont(name: string, data: Uint8Array): void;
|
|
1716
1885
|
static setRandomSeed: (seed: number) => void;
|
|
1886
|
+
static setLogEvents(eventTypes: LogEventTypes): void;
|
|
1887
|
+
private static logDelegate;
|
|
1888
|
+
private static getEventTypeString;
|
|
1717
1889
|
}
|
|
1718
1890
|
export declare class Quantum {
|
|
1719
1891
|
static get depth(): number;
|