@imagemagick/magick-wasm 0.0.27 → 0.0.29
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 +18 -20
- package/README.md +1 -1
- package/dist/index.d.ts +644 -509
- package/dist/index.js +3700 -3262
- package/dist/index.umd.cjs +45 -4
- package/dist/magick.wasm +0 -0
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v9.
|
|
1
|
+
// Generated by dts-bundle-generator v9.3.1
|
|
2
2
|
|
|
3
3
|
export type ByteArray = Int8Array | Uint8Array | Uint8ClampedArray;
|
|
4
|
+
export interface IConfigurationFile {
|
|
5
|
+
readonly fileName: string;
|
|
6
|
+
data: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IConfigurationFiles {
|
|
9
|
+
all(): Generator<IConfigurationFile>;
|
|
10
|
+
readonly log: IConfigurationFile;
|
|
11
|
+
readonly policy: IConfigurationFile;
|
|
12
|
+
}
|
|
13
|
+
export declare class ConfigurationFiles implements IConfigurationFiles {
|
|
14
|
+
private constructor();
|
|
15
|
+
static default: IConfigurationFiles;
|
|
16
|
+
all(): Generator<IConfigurationFile>;
|
|
17
|
+
readonly log: IConfigurationFile;
|
|
18
|
+
readonly policy: IConfigurationFile;
|
|
19
|
+
}
|
|
4
20
|
export declare enum MagickFormat {
|
|
5
21
|
Unknown = "UNKNOWN",
|
|
6
22
|
ThreeFr = "3FR",
|
|
@@ -9,7 +25,7 @@ export declare enum MagickFormat {
|
|
|
9
25
|
A = "A",
|
|
10
26
|
Aai = "AAI",
|
|
11
27
|
Ai = "AI",
|
|
12
|
-
|
|
28
|
+
APng = "APNG",
|
|
13
29
|
Art = "ART",
|
|
14
30
|
Arw = "ARW",
|
|
15
31
|
Ashlar = "ASHLAR",
|
|
@@ -68,14 +84,15 @@ export declare enum MagickFormat {
|
|
|
68
84
|
Farbfeld = "FARBFELD",
|
|
69
85
|
Fax = "FAX",
|
|
70
86
|
Ff = "FF",
|
|
87
|
+
Fff = "FFF",
|
|
71
88
|
File = "FILE",
|
|
72
89
|
Fits = "FITS",
|
|
73
90
|
Fl32 = "FL32",
|
|
74
91
|
Flv = "FLV",
|
|
75
92
|
Fractal = "FRACTAL",
|
|
76
93
|
Ftp = "FTP",
|
|
77
|
-
Ftxt = "FTXT",
|
|
78
94
|
Fts = "FTS",
|
|
95
|
+
Ftxt = "FTXT",
|
|
79
96
|
G = "G",
|
|
80
97
|
G3 = "G3",
|
|
81
98
|
G4 = "G4",
|
|
@@ -130,12 +147,14 @@ export declare enum MagickFormat {
|
|
|
130
147
|
Mask = "MASK",
|
|
131
148
|
Mat = "MAT",
|
|
132
149
|
Matte = "MATTE",
|
|
150
|
+
Mdc = "MDC",
|
|
133
151
|
Mef = "MEF",
|
|
134
152
|
Miff = "MIFF",
|
|
135
153
|
Mkv = "MKV",
|
|
136
154
|
Mng = "MNG",
|
|
137
155
|
Mono = "MONO",
|
|
138
156
|
Mov = "MOV",
|
|
157
|
+
Mos = "MOS",
|
|
139
158
|
Mp4 = "MP4",
|
|
140
159
|
Mpc = "MPC",
|
|
141
160
|
Mpeg = "MPEG",
|
|
@@ -213,6 +232,7 @@ export declare enum MagickFormat {
|
|
|
213
232
|
Rle = "RLE",
|
|
214
233
|
Rmf = "RMF",
|
|
215
234
|
Rw2 = "RW2",
|
|
235
|
+
Rwl = "RWL",
|
|
216
236
|
Scr = "SCR",
|
|
217
237
|
Screenshot = "SCREENSHOT",
|
|
218
238
|
Sct = "SCT",
|
|
@@ -224,7 +244,9 @@ export declare enum MagickFormat {
|
|
|
224
244
|
SparseColor = "SPARSE-COLOR",
|
|
225
245
|
Sr2 = "SR2",
|
|
226
246
|
Srf = "SRF",
|
|
247
|
+
Srw = "SRW",
|
|
227
248
|
Stegano = "STEGANO",
|
|
249
|
+
Sti = "STI",
|
|
228
250
|
StrImg = "STRIMG",
|
|
229
251
|
Sun = "SUN",
|
|
230
252
|
Svg = "SVG",
|
|
@@ -232,6 +254,7 @@ export declare enum MagickFormat {
|
|
|
232
254
|
Text = "TEXT",
|
|
233
255
|
Tga = "TGA",
|
|
234
256
|
Thumbnail = "THUMBNAIL",
|
|
257
|
+
Tif = "TIF",
|
|
235
258
|
Tiff = "TIFF",
|
|
236
259
|
Tiff64 = "TIFF64",
|
|
237
260
|
Tile = "TILE",
|
|
@@ -250,9 +273,9 @@ export declare enum MagickFormat {
|
|
|
250
273
|
Viff = "VIFF",
|
|
251
274
|
Vips = "VIPS",
|
|
252
275
|
Vst = "VST",
|
|
276
|
+
WebM = "WEBM",
|
|
277
|
+
WebP = "WEBP",
|
|
253
278
|
Wbmp = "WBMP",
|
|
254
|
-
Webp = "WEBP",
|
|
255
|
-
Webm = "WEBM",
|
|
256
279
|
Wmv = "WMV",
|
|
257
280
|
Wpg = "WPG",
|
|
258
281
|
X3f = "X3F",
|
|
@@ -499,8 +522,8 @@ export declare class DrawableTextAlignment implements IDrawable {
|
|
|
499
522
|
export declare class DrawableTextAntialias implements IDrawable {
|
|
500
523
|
private readonly _isEnabled;
|
|
501
524
|
private constructor();
|
|
502
|
-
static get
|
|
503
|
-
static get
|
|
525
|
+
static get disabled(): DrawableTextAntialias;
|
|
526
|
+
static get enabled(): DrawableTextAntialias;
|
|
504
527
|
draw(wand: IDrawingWand): void;
|
|
505
528
|
}
|
|
506
529
|
export declare class DrawableTextDecoration implements IDrawable {
|
|
@@ -535,7 +558,7 @@ export declare class DrawableText implements IDrawable {
|
|
|
535
558
|
constructor(x: number, y: number, value: string);
|
|
536
559
|
draw(wand: IDrawingWand): void;
|
|
537
560
|
}
|
|
538
|
-
|
|
561
|
+
declare enum AlphaOption$1 {
|
|
539
562
|
Undefined = 0,
|
|
540
563
|
Activate = 1,
|
|
541
564
|
Associate = 2,
|
|
@@ -551,7 +574,8 @@ export declare enum AlphaOption {
|
|
|
551
574
|
Remove = 12,
|
|
552
575
|
Set = 13,
|
|
553
576
|
Shape = 14,
|
|
554
|
-
Transparent = 15
|
|
577
|
+
Transparent = 15,
|
|
578
|
+
OffIfOpaque = 16
|
|
555
579
|
}
|
|
556
580
|
export declare enum AutoThresholdMethod {
|
|
557
581
|
Undefined = 0,
|
|
@@ -632,6 +656,19 @@ export declare enum Channels {
|
|
|
632
656
|
Meta52 = 1073741824,
|
|
633
657
|
All = 134217727
|
|
634
658
|
}
|
|
659
|
+
export declare class PrimaryInfo {
|
|
660
|
+
constructor(x: number, y: number, z: number);
|
|
661
|
+
readonly x: number;
|
|
662
|
+
readonly y: number;
|
|
663
|
+
readonly z: number;
|
|
664
|
+
}
|
|
665
|
+
export declare class ChromaticityInfo {
|
|
666
|
+
constructor(red: PrimaryInfo, green: PrimaryInfo, blue: PrimaryInfo, white: PrimaryInfo);
|
|
667
|
+
readonly red: PrimaryInfo;
|
|
668
|
+
readonly green: PrimaryInfo;
|
|
669
|
+
readonly blue: PrimaryInfo;
|
|
670
|
+
readonly white: PrimaryInfo;
|
|
671
|
+
}
|
|
635
672
|
export declare enum ClassType {
|
|
636
673
|
Undefined = 0,
|
|
637
674
|
Direct = 1,
|
|
@@ -801,11 +838,114 @@ export declare enum CompressionMethod {
|
|
|
801
838
|
BC7 = 26,
|
|
802
839
|
BC5 = 27
|
|
803
840
|
}
|
|
841
|
+
export interface IMagickGeometry {
|
|
842
|
+
readonly aspectRatio: boolean;
|
|
843
|
+
fillArea: boolean;
|
|
844
|
+
greater: boolean;
|
|
845
|
+
height: number;
|
|
846
|
+
ignoreAspectRatio: boolean;
|
|
847
|
+
isPercentage: boolean;
|
|
848
|
+
less: boolean;
|
|
849
|
+
limitPixels: boolean;
|
|
850
|
+
width: number;
|
|
851
|
+
x: number;
|
|
852
|
+
y: number;
|
|
853
|
+
}
|
|
854
|
+
export declare class MagickGeometry implements IMagickGeometry {
|
|
855
|
+
private _width;
|
|
856
|
+
private _height;
|
|
857
|
+
private _x;
|
|
858
|
+
private _y;
|
|
859
|
+
private _aspectRatio;
|
|
860
|
+
private _fillArea;
|
|
861
|
+
private _greater;
|
|
862
|
+
private _isPercentage;
|
|
863
|
+
private _ignoreAspectRatio;
|
|
864
|
+
private _less;
|
|
865
|
+
private _limitPixels;
|
|
866
|
+
constructor(value: string);
|
|
867
|
+
constructor(widthAndHeight: number);
|
|
868
|
+
constructor(width: number, height: number);
|
|
869
|
+
constructor(x: number, y: number, width: number, height: number);
|
|
870
|
+
get aspectRatio(): boolean;
|
|
871
|
+
get fillArea(): boolean;
|
|
872
|
+
set fillArea(value: boolean);
|
|
873
|
+
get greater(): boolean;
|
|
874
|
+
set greater(value: boolean);
|
|
875
|
+
get height(): number;
|
|
876
|
+
set height(value: number);
|
|
877
|
+
get ignoreAspectRatio(): boolean;
|
|
878
|
+
set ignoreAspectRatio(value: boolean);
|
|
879
|
+
get isPercentage(): boolean;
|
|
880
|
+
set isPercentage(value: boolean);
|
|
881
|
+
get less(): boolean;
|
|
882
|
+
set less(value: boolean);
|
|
883
|
+
get limitPixels(): boolean;
|
|
884
|
+
set limitPixels(value: boolean);
|
|
885
|
+
get width(): number;
|
|
886
|
+
set width(value: number);
|
|
887
|
+
get x(): number;
|
|
888
|
+
set x(value: number);
|
|
889
|
+
get y(): number;
|
|
890
|
+
set y(value: number);
|
|
891
|
+
toString(): string;
|
|
892
|
+
private initialize;
|
|
893
|
+
private initializeFromAspectRation;
|
|
894
|
+
private parseNumber;
|
|
895
|
+
private isNumber;
|
|
896
|
+
private hasFlag;
|
|
897
|
+
}
|
|
898
|
+
export declare class Point {
|
|
899
|
+
constructor(xy: number);
|
|
900
|
+
constructor(x: number, y: number);
|
|
901
|
+
readonly x: number;
|
|
902
|
+
readonly y: number;
|
|
903
|
+
}
|
|
904
|
+
export declare class ConnectedComponent {
|
|
905
|
+
private constructor();
|
|
906
|
+
readonly area: number;
|
|
907
|
+
readonly centroid: Point;
|
|
908
|
+
readonly color?: IMagickColor;
|
|
909
|
+
readonly height: number;
|
|
910
|
+
readonly id: number;
|
|
911
|
+
readonly width: number;
|
|
912
|
+
readonly x: number;
|
|
913
|
+
readonly y: number;
|
|
914
|
+
toGeometry(): IMagickGeometry;
|
|
915
|
+
}
|
|
916
|
+
export declare class Threshold {
|
|
917
|
+
constructor(minimum: number, maximum?: number);
|
|
918
|
+
readonly minimum: number;
|
|
919
|
+
readonly maximum: number;
|
|
920
|
+
toString(): string;
|
|
921
|
+
}
|
|
922
|
+
export type Connectivity = 4 | 8;
|
|
923
|
+
export declare class ConnectedComponentsSettings {
|
|
924
|
+
angleThreshold?: Threshold;
|
|
925
|
+
areaThreshold?: Threshold;
|
|
926
|
+
circularityThreshold?: Threshold;
|
|
927
|
+
connectivity: Connectivity;
|
|
928
|
+
diameterThreshold?: Threshold;
|
|
929
|
+
eccentricityThreshold?: Threshold;
|
|
930
|
+
majorAxisThreshold?: Threshold;
|
|
931
|
+
meanColor?: boolean;
|
|
932
|
+
minorAxisThreshold?: Threshold;
|
|
933
|
+
perimeterThreshold?: Threshold;
|
|
934
|
+
constructor(connectivity: Connectivity);
|
|
935
|
+
}
|
|
804
936
|
export declare enum DensityUnit {
|
|
805
937
|
Undefined = 0,
|
|
806
938
|
PixelsPerInch = 1,
|
|
807
939
|
PixelsPerCentimeter = 2
|
|
808
940
|
}
|
|
941
|
+
export declare class Density {
|
|
942
|
+
constructor(xy: number);
|
|
943
|
+
constructor(xy: number, unit: DensityUnit);
|
|
944
|
+
constructor(x: number, y: number, units: DensityUnit);
|
|
945
|
+
readonly x: number;
|
|
946
|
+
readonly y: number;
|
|
947
|
+
readonly units: DensityUnit;
|
|
948
|
+
}
|
|
809
949
|
export declare enum DistortMethod {
|
|
810
950
|
Undefined = 0,
|
|
811
951
|
Affine = 1,
|
|
@@ -828,6 +968,13 @@ export declare enum DistortMethod {
|
|
|
828
968
|
Sentinel = 18,
|
|
829
969
|
RigidAffine = 19
|
|
830
970
|
}
|
|
971
|
+
export declare class DistortSettings {
|
|
972
|
+
constructor(method: DistortMethod);
|
|
973
|
+
readonly method: DistortMethod;
|
|
974
|
+
bestFit: boolean;
|
|
975
|
+
scale?: number;
|
|
976
|
+
viewport?: IMagickGeometry;
|
|
977
|
+
}
|
|
831
978
|
export declare enum Endian {
|
|
832
979
|
Undefined = 0,
|
|
833
980
|
LSB = 1,
|
|
@@ -924,6 +1071,15 @@ export declare enum GifDisposeMethod {
|
|
|
924
1071
|
Background = 2,
|
|
925
1072
|
Previous = 3
|
|
926
1073
|
}
|
|
1074
|
+
export interface IImageProfile {
|
|
1075
|
+
readonly name: string;
|
|
1076
|
+
readonly data: Uint8Array;
|
|
1077
|
+
}
|
|
1078
|
+
export declare class ImageProfile implements IImageProfile {
|
|
1079
|
+
constructor(name: string, data: Uint8Array);
|
|
1080
|
+
readonly name: string;
|
|
1081
|
+
readonly data: Uint8Array;
|
|
1082
|
+
}
|
|
927
1083
|
export declare enum Interlace {
|
|
928
1084
|
Undefined = 0,
|
|
929
1085
|
NoInterlace = 1,
|
|
@@ -934,6 +1090,121 @@ export declare enum Interlace {
|
|
|
934
1090
|
Jpeg = 6,
|
|
935
1091
|
Png = 7
|
|
936
1092
|
}
|
|
1093
|
+
export declare class MagickSettings {
|
|
1094
|
+
antiAlias?: boolean;
|
|
1095
|
+
backgroundColor?: IMagickColor;
|
|
1096
|
+
colorSpace?: ColorSpace;
|
|
1097
|
+
colorType?: ColorType;
|
|
1098
|
+
compression?: CompressionMethod;
|
|
1099
|
+
debug?: boolean;
|
|
1100
|
+
depth?: number;
|
|
1101
|
+
endian?: Endian;
|
|
1102
|
+
fillColor?: IMagickColor;
|
|
1103
|
+
font?: string;
|
|
1104
|
+
fontPointsize?: number;
|
|
1105
|
+
format?: MagickFormat;
|
|
1106
|
+
interlace?: Interlace;
|
|
1107
|
+
strokeColor?: IMagickColor;
|
|
1108
|
+
strokeWidth?: number;
|
|
1109
|
+
textInterlineSpacing?: number;
|
|
1110
|
+
textKerning?: number;
|
|
1111
|
+
getDefine(name: string): string;
|
|
1112
|
+
getDefine(format: MagickFormat, name: string): string;
|
|
1113
|
+
setDefine(name: string, value: string): void;
|
|
1114
|
+
setDefine(format: MagickFormat, name: string, value: string): void;
|
|
1115
|
+
setDefine(format: MagickFormat, name: string, value: number): void;
|
|
1116
|
+
setDefine(format: MagickFormat, name: string, value: boolean): void;
|
|
1117
|
+
setDefines(defines: IDefines): void;
|
|
1118
|
+
private parseDefine;
|
|
1119
|
+
}
|
|
1120
|
+
export declare class MagickReadSettings extends MagickSettings {
|
|
1121
|
+
constructor(partialSettings?: Partial<MagickReadSettings>);
|
|
1122
|
+
height?: number;
|
|
1123
|
+
width?: number;
|
|
1124
|
+
private getSize;
|
|
1125
|
+
}
|
|
1126
|
+
export declare class MontageSettings {
|
|
1127
|
+
backgroundColor?: IMagickColor;
|
|
1128
|
+
borderColor?: IMagickColor;
|
|
1129
|
+
borderWidth?: number;
|
|
1130
|
+
fillColor?: IMagickColor;
|
|
1131
|
+
font?: string;
|
|
1132
|
+
fontPointsize?: number;
|
|
1133
|
+
frameGeometry?: IMagickGeometry;
|
|
1134
|
+
geometry?: IMagickGeometry;
|
|
1135
|
+
gravity?: Gravity;
|
|
1136
|
+
label?: string;
|
|
1137
|
+
shadow?: boolean;
|
|
1138
|
+
strokeColor?: IMagickColor;
|
|
1139
|
+
textureFileName?: string;
|
|
1140
|
+
tileGeometry?: IMagickGeometry;
|
|
1141
|
+
title?: string;
|
|
1142
|
+
transparentColor?: IMagickColor;
|
|
1143
|
+
}
|
|
1144
|
+
export interface IMagickImageCollection extends Array<IMagickImage>, IDisposable {
|
|
1145
|
+
appendHorizontally<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1146
|
+
appendHorizontally<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1147
|
+
appendVertically<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1148
|
+
appendVertically<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1149
|
+
clone<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1150
|
+
clone<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1151
|
+
coalesce(): void;
|
|
1152
|
+
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1153
|
+
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1154
|
+
flatten<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1155
|
+
flatten<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1156
|
+
merge<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1157
|
+
merge<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1158
|
+
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1159
|
+
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1160
|
+
mosaic<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1161
|
+
mosaic<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1162
|
+
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1163
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1164
|
+
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1165
|
+
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1166
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1167
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1168
|
+
}
|
|
1169
|
+
export declare class MagickImageCollection extends Array<MagickImage> implements IMagickImageCollection {
|
|
1170
|
+
private constructor();
|
|
1171
|
+
static create(): IMagickImageCollection;
|
|
1172
|
+
static create(array: ByteArray): IMagickImageCollection;
|
|
1173
|
+
dispose(): void;
|
|
1174
|
+
appendHorizontally<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1175
|
+
appendHorizontally<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1176
|
+
appendVertically<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1177
|
+
appendVertically<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1178
|
+
clone<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1179
|
+
clone<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1180
|
+
coalesce(): void;
|
|
1181
|
+
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1182
|
+
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1183
|
+
flatten<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1184
|
+
flatten<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1185
|
+
merge<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1186
|
+
merge<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1187
|
+
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1188
|
+
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1189
|
+
mosaic<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1190
|
+
mosaic<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1191
|
+
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1192
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1193
|
+
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1194
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1195
|
+
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1196
|
+
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1197
|
+
private addImages;
|
|
1198
|
+
private attachImages;
|
|
1199
|
+
private static createObject;
|
|
1200
|
+
private createImage;
|
|
1201
|
+
private static createSettings;
|
|
1202
|
+
private detachImages;
|
|
1203
|
+
private getSettings;
|
|
1204
|
+
private mergeImages;
|
|
1205
|
+
private throwIfEmpty;
|
|
1206
|
+
private checkResult;
|
|
1207
|
+
}
|
|
937
1208
|
export declare enum Kernel {
|
|
938
1209
|
Undefined = "Undefined",
|
|
939
1210
|
Unity = "Unity",
|
|
@@ -974,78 +1245,6 @@ export declare enum Kernel {
|
|
|
974
1245
|
Euclidean = "Euclidean",
|
|
975
1246
|
UserDefined = "UserDefined"
|
|
976
1247
|
}
|
|
977
|
-
export declare enum LogEventTypes {
|
|
978
|
-
None = 0,
|
|
979
|
-
Accelerate = 1,
|
|
980
|
-
Annotate = 2,
|
|
981
|
-
Blob = 4,
|
|
982
|
-
Cache = 8,
|
|
983
|
-
Coder = 16,
|
|
984
|
-
Configure = 32,
|
|
985
|
-
Deprecate = 64,
|
|
986
|
-
Draw = 128,
|
|
987
|
-
Exception = 256,
|
|
988
|
-
Image = 512,
|
|
989
|
-
Locale = 1024,
|
|
990
|
-
Module = 2048,
|
|
991
|
-
Pixel = 4096,
|
|
992
|
-
Policy = 8192,
|
|
993
|
-
Resource = 16384,
|
|
994
|
-
Trace = 32768,
|
|
995
|
-
Transform = 65536,
|
|
996
|
-
User = 131072,
|
|
997
|
-
Wand = 262144,
|
|
998
|
-
Detailed = 2147450879,
|
|
999
|
-
All = 2147483647
|
|
1000
|
-
}
|
|
1001
|
-
export declare enum MagickErrorSeverity {
|
|
1002
|
-
Warning = 300,
|
|
1003
|
-
ResourceLimitWarning = 300,
|
|
1004
|
-
TypeWarning = 305,
|
|
1005
|
-
OptionWarning = 310,
|
|
1006
|
-
DelegateWarning = 315,
|
|
1007
|
-
MissingDelegateWarning = 320,
|
|
1008
|
-
CorruptImageWarning = 325,
|
|
1009
|
-
FileOpenWarning = 330,
|
|
1010
|
-
BlobWarning = 335,
|
|
1011
|
-
StreamWarning = 340,
|
|
1012
|
-
CacheWarning = 345,
|
|
1013
|
-
CoderWarning = 350,
|
|
1014
|
-
FilterWarning = 352,
|
|
1015
|
-
ModuleWarning = 355,
|
|
1016
|
-
DrawWarning = 360,
|
|
1017
|
-
ImageWarning = 365,
|
|
1018
|
-
WandWarning = 370,
|
|
1019
|
-
RandomWarning = 375,
|
|
1020
|
-
XServerWarning = 380,
|
|
1021
|
-
MonitorWarning = 385,
|
|
1022
|
-
RegistryWarning = 390,
|
|
1023
|
-
ConfigureWarning = 395,
|
|
1024
|
-
PolicyWarning = 399,
|
|
1025
|
-
Error = 400,
|
|
1026
|
-
ResourceLimitError = 400,
|
|
1027
|
-
TypeError = 405,
|
|
1028
|
-
OptionError = 410,
|
|
1029
|
-
DelegateError = 415,
|
|
1030
|
-
MissingDelegateError = 420,
|
|
1031
|
-
CorruptImageError = 425,
|
|
1032
|
-
FileOpenError = 430,
|
|
1033
|
-
BlobError = 435,
|
|
1034
|
-
StreamError = 440,
|
|
1035
|
-
CacheError = 445,
|
|
1036
|
-
CoderError = 450,
|
|
1037
|
-
FilterError = 452,
|
|
1038
|
-
ModuleError = 455,
|
|
1039
|
-
DrawError = 460,
|
|
1040
|
-
ImageError = 465,
|
|
1041
|
-
WandError = 470,
|
|
1042
|
-
RandomError = 475,
|
|
1043
|
-
XServerError = 480,
|
|
1044
|
-
MonitorError = 485,
|
|
1045
|
-
RegistryError = 490,
|
|
1046
|
-
ConfigureError = 495,
|
|
1047
|
-
PolicyError = 499
|
|
1048
|
-
}
|
|
1049
1248
|
export declare enum MorphologyMethod {
|
|
1050
1249
|
Undefined = 0,
|
|
1051
1250
|
Convolve = 1,
|
|
@@ -1071,7 +1270,16 @@ export declare enum MorphologyMethod {
|
|
|
1071
1270
|
Distance = 21,
|
|
1072
1271
|
Voronoi = 22
|
|
1073
1272
|
}
|
|
1074
|
-
export declare
|
|
1273
|
+
export declare class MorphologySettings {
|
|
1274
|
+
constructor(method: MorphologyMethod, kernel: Kernel | string, args?: string);
|
|
1275
|
+
channels: Channels;
|
|
1276
|
+
convolveBias: Percentage | undefined;
|
|
1277
|
+
convolveScale: IMagickGeometry | undefined;
|
|
1278
|
+
iterations: number;
|
|
1279
|
+
readonly kernel: string;
|
|
1280
|
+
readonly method: MorphologyMethod;
|
|
1281
|
+
}
|
|
1282
|
+
declare enum OrientationType$1 {
|
|
1075
1283
|
Undefined = 0,
|
|
1076
1284
|
TopLeft = 1,
|
|
1077
1285
|
TopRight = 2,
|
|
@@ -1094,411 +1302,59 @@ export declare enum PixelChannel {
|
|
|
1094
1302
|
Alpha = 4,
|
|
1095
1303
|
Index = 5,
|
|
1096
1304
|
Meta0 = 10,
|
|
1097
|
-
Meta1 = 11,
|
|
1098
|
-
Meta2 = 12,
|
|
1099
|
-
Meta3 = 13,
|
|
1100
|
-
Meta4 = 14,
|
|
1101
|
-
Meta5 = 15,
|
|
1102
|
-
Meta6 = 16,
|
|
1103
|
-
Meta7 = 17,
|
|
1104
|
-
Meta8 = 18,
|
|
1105
|
-
Meta9 = 19,
|
|
1106
|
-
Meta10 = 20,
|
|
1107
|
-
Meta11 = 21,
|
|
1108
|
-
Meta12 = 22,
|
|
1109
|
-
Meta13 = 23,
|
|
1110
|
-
Meta14 = 24,
|
|
1111
|
-
Meta15 = 25,
|
|
1112
|
-
Meta16 = 26,
|
|
1113
|
-
Meta17 = 27,
|
|
1114
|
-
Meta18 = 28,
|
|
1115
|
-
Meta19 = 29,
|
|
1116
|
-
Meta20 = 30,
|
|
1117
|
-
Meta21 = 31,
|
|
1118
|
-
Meta22 = 32,
|
|
1119
|
-
Meta23 = 33,
|
|
1120
|
-
Meta24 = 34,
|
|
1121
|
-
Meta25 = 35,
|
|
1122
|
-
Meta26 = 36,
|
|
1123
|
-
Meta27 = 37,
|
|
1124
|
-
Meta28 = 38,
|
|
1125
|
-
Meta29 = 39,
|
|
1126
|
-
Meta30 = 40,
|
|
1127
|
-
Meta31 = 41,
|
|
1128
|
-
Meta32 = 42,
|
|
1129
|
-
Meta33 = 43,
|
|
1130
|
-
Meta34 = 44,
|
|
1131
|
-
Meta35 = 45,
|
|
1132
|
-
Meta36 = 46,
|
|
1133
|
-
Meta37 = 47,
|
|
1134
|
-
Meta38 = 48,
|
|
1135
|
-
Meta39 = 49,
|
|
1136
|
-
Meta40 = 50,
|
|
1137
|
-
Meta41 = 51,
|
|
1138
|
-
Meta42 = 52,
|
|
1139
|
-
Meta43 = 53,
|
|
1140
|
-
Meta44 = 54,
|
|
1141
|
-
Meta45 = 55,
|
|
1142
|
-
Meta46 = 56,
|
|
1143
|
-
Meta47 = 57,
|
|
1144
|
-
Meta48 = 58,
|
|
1145
|
-
Meta49 = 59,
|
|
1146
|
-
Meta50 = 60,
|
|
1147
|
-
Meta51 = 61,
|
|
1148
|
-
Meta52 = 62,
|
|
1149
|
-
Composite = 64
|
|
1150
|
-
}
|
|
1151
|
-
export declare enum PixelIntensityMethod {
|
|
1152
|
-
Undefined = 0,
|
|
1153
|
-
Average = 1,
|
|
1154
|
-
Brightness = 2,
|
|
1155
|
-
Lightness = 3,
|
|
1156
|
-
MS = 4,
|
|
1157
|
-
Rec601Luma = 5,
|
|
1158
|
-
Rec601Luminance = 6,
|
|
1159
|
-
Rec709Luma = 7,
|
|
1160
|
-
Rec709Luminance = 8,
|
|
1161
|
-
RMS = 9
|
|
1162
|
-
}
|
|
1163
|
-
export declare enum PixelInterpolateMethod {
|
|
1164
|
-
Undefined = 0,
|
|
1165
|
-
Average = 1,
|
|
1166
|
-
Average9 = 2,
|
|
1167
|
-
Average16 = 3,
|
|
1168
|
-
Background = 4,
|
|
1169
|
-
Bilinear = 5,
|
|
1170
|
-
Blend = 6,
|
|
1171
|
-
Catrom = 7,
|
|
1172
|
-
Integer = 8,
|
|
1173
|
-
Mesh = 9,
|
|
1174
|
-
Nearest = 10,
|
|
1175
|
-
Spline = 11
|
|
1176
|
-
}
|
|
1177
|
-
export declare enum RenderingIntent {
|
|
1178
|
-
Undefined = 0,
|
|
1179
|
-
Saturation = 1,
|
|
1180
|
-
Perceptual = 2,
|
|
1181
|
-
Absolute = 3,
|
|
1182
|
-
Relative = 4
|
|
1183
|
-
}
|
|
1184
|
-
export declare enum VirtualPixelMethod {
|
|
1185
|
-
Undefined = 0,
|
|
1186
|
-
Background = 1,
|
|
1187
|
-
Dither = 2,
|
|
1188
|
-
Edge = 3,
|
|
1189
|
-
Mirror = 4,
|
|
1190
|
-
Random = 5,
|
|
1191
|
-
Tile = 6,
|
|
1192
|
-
Transparent = 7,
|
|
1193
|
-
Mask = 8,
|
|
1194
|
-
Black = 9,
|
|
1195
|
-
Gray = 10,
|
|
1196
|
-
White = 11,
|
|
1197
|
-
HorizontalTile = 12,
|
|
1198
|
-
VerticalTile = 13,
|
|
1199
|
-
HorizontalTileEdge = 14,
|
|
1200
|
-
VerticalTileEdge = 15,
|
|
1201
|
-
CheckerTile = 16
|
|
1202
|
-
}
|
|
1203
|
-
export declare class LogEvent {
|
|
1204
|
-
constructor(eventType: LogEventTypes, message?: string);
|
|
1205
|
-
readonly eventType: LogEventTypes;
|
|
1206
|
-
readonly message: string;
|
|
1207
|
-
}
|
|
1208
|
-
export declare class ProgressEvent {
|
|
1209
|
-
readonly origin: string | null;
|
|
1210
|
-
readonly progress: Percentage;
|
|
1211
|
-
cancel: boolean;
|
|
1212
|
-
}
|
|
1213
|
-
export declare class MagickError extends Error {
|
|
1214
|
-
private _relatedErrors;
|
|
1215
|
-
readonly severity: MagickErrorSeverity;
|
|
1216
|
-
get relatedErrors(): ReadonlyArray<MagickError>;
|
|
1217
|
-
}
|
|
1218
|
-
export declare class WarningEvent {
|
|
1219
|
-
readonly error: MagickError;
|
|
1220
|
-
}
|
|
1221
|
-
export declare enum DngInterpolation {
|
|
1222
|
-
Disabled = -1,
|
|
1223
|
-
Linear = 0,
|
|
1224
|
-
Vng = 1,
|
|
1225
|
-
Ppg = 2,
|
|
1226
|
-
Ahd = 3,
|
|
1227
|
-
DCB = 4,
|
|
1228
|
-
Dht = 11,
|
|
1229
|
-
ModifiedAhd = 12
|
|
1230
|
-
}
|
|
1231
|
-
export declare enum DngOutputColor {
|
|
1232
|
-
Raw = 0,
|
|
1233
|
-
SRGB = 1,
|
|
1234
|
-
AdobeRGB = 2,
|
|
1235
|
-
WideGamutRGB = 3,
|
|
1236
|
-
KodakProPhotoRGB = 4,
|
|
1237
|
-
XYZ = 5,
|
|
1238
|
-
ACES = 6
|
|
1239
|
-
}
|
|
1240
|
-
export declare class DngReadDefines extends DefinesCreator {
|
|
1241
|
-
constructor();
|
|
1242
|
-
disableAutoBrightness?: boolean;
|
|
1243
|
-
interpolationQuality?: DngInterpolation;
|
|
1244
|
-
outputColor?: DngOutputColor;
|
|
1245
|
-
useAutoWhitebalance?: boolean;
|
|
1246
|
-
useCameraWhitebalance?: boolean;
|
|
1247
|
-
getDefines(): IDefine[];
|
|
1248
|
-
}
|
|
1249
|
-
export declare class PrimaryInfo {
|
|
1250
|
-
constructor(x: number, y: number, z: number);
|
|
1251
|
-
readonly x: number;
|
|
1252
|
-
readonly y: number;
|
|
1253
|
-
readonly z: number;
|
|
1254
|
-
}
|
|
1255
|
-
export declare class ChromaticityInfo {
|
|
1256
|
-
constructor(red: PrimaryInfo, green: PrimaryInfo, blue: PrimaryInfo, white: PrimaryInfo);
|
|
1257
|
-
readonly red: PrimaryInfo;
|
|
1258
|
-
readonly green: PrimaryInfo;
|
|
1259
|
-
readonly blue: PrimaryInfo;
|
|
1260
|
-
readonly white: PrimaryInfo;
|
|
1261
|
-
}
|
|
1262
|
-
export interface IMagickGeometry {
|
|
1263
|
-
readonly aspectRatio: boolean;
|
|
1264
|
-
fillArea: boolean;
|
|
1265
|
-
greater: boolean;
|
|
1266
|
-
height: number;
|
|
1267
|
-
ignoreAspectRatio: boolean;
|
|
1268
|
-
isPercentage: boolean;
|
|
1269
|
-
less: boolean;
|
|
1270
|
-
limitPixels: boolean;
|
|
1271
|
-
width: number;
|
|
1272
|
-
x: number;
|
|
1273
|
-
y: number;
|
|
1274
|
-
}
|
|
1275
|
-
export declare class MagickGeometry implements IMagickGeometry {
|
|
1276
|
-
private _width;
|
|
1277
|
-
private _height;
|
|
1278
|
-
private _x;
|
|
1279
|
-
private _y;
|
|
1280
|
-
private _aspectRatio;
|
|
1281
|
-
private _fillArea;
|
|
1282
|
-
private _greater;
|
|
1283
|
-
private _isPercentage;
|
|
1284
|
-
private _ignoreAspectRatio;
|
|
1285
|
-
private _less;
|
|
1286
|
-
private _limitPixels;
|
|
1287
|
-
constructor(value: string);
|
|
1288
|
-
constructor(widthAndHeight: number);
|
|
1289
|
-
constructor(width: number, height: number);
|
|
1290
|
-
constructor(x: number, y: number, width: number, height: number);
|
|
1291
|
-
get aspectRatio(): boolean;
|
|
1292
|
-
get fillArea(): boolean;
|
|
1293
|
-
set fillArea(value: boolean);
|
|
1294
|
-
get greater(): boolean;
|
|
1295
|
-
set greater(value: boolean);
|
|
1296
|
-
get height(): number;
|
|
1297
|
-
set height(value: number);
|
|
1298
|
-
get ignoreAspectRatio(): boolean;
|
|
1299
|
-
set ignoreAspectRatio(value: boolean);
|
|
1300
|
-
get isPercentage(): boolean;
|
|
1301
|
-
set isPercentage(value: boolean);
|
|
1302
|
-
get less(): boolean;
|
|
1303
|
-
set less(value: boolean);
|
|
1304
|
-
get limitPixels(): boolean;
|
|
1305
|
-
set limitPixels(value: boolean);
|
|
1306
|
-
get width(): number;
|
|
1307
|
-
set width(value: number);
|
|
1308
|
-
get x(): number;
|
|
1309
|
-
set x(value: number);
|
|
1310
|
-
get y(): number;
|
|
1311
|
-
set y(value: number);
|
|
1312
|
-
toString(): string;
|
|
1313
|
-
private initialize;
|
|
1314
|
-
private initializeFromAspectRation;
|
|
1315
|
-
private parseNumber;
|
|
1316
|
-
private isNumber;
|
|
1317
|
-
private hasFlag;
|
|
1318
|
-
}
|
|
1319
|
-
export declare class Point {
|
|
1320
|
-
constructor(xy: number);
|
|
1321
|
-
constructor(x: number, y: number);
|
|
1322
|
-
readonly x: number;
|
|
1323
|
-
readonly y: number;
|
|
1324
|
-
}
|
|
1325
|
-
export declare class ConnectedComponent {
|
|
1326
|
-
private constructor();
|
|
1327
|
-
readonly area: number;
|
|
1328
|
-
readonly centroid: Point;
|
|
1329
|
-
readonly color?: IMagickColor;
|
|
1330
|
-
readonly height: number;
|
|
1331
|
-
readonly id: number;
|
|
1332
|
-
readonly width: number;
|
|
1333
|
-
readonly x: number;
|
|
1334
|
-
readonly y: number;
|
|
1335
|
-
toGeometry(): IMagickGeometry;
|
|
1336
|
-
}
|
|
1337
|
-
export declare class Threshold {
|
|
1338
|
-
constructor(minimum: number, maximum?: number);
|
|
1339
|
-
readonly minimum: number;
|
|
1340
|
-
readonly maximum: number;
|
|
1341
|
-
toString(): string;
|
|
1342
|
-
}
|
|
1343
|
-
export type Connectivity = 4 | 8;
|
|
1344
|
-
export declare class ConnectedComponentsSettings {
|
|
1345
|
-
angleThreshold?: Threshold;
|
|
1346
|
-
areaThreshold?: Threshold;
|
|
1347
|
-
circularityThreshold?: Threshold;
|
|
1348
|
-
connectivity: Connectivity;
|
|
1349
|
-
diameterThreshold?: Threshold;
|
|
1350
|
-
eccentricityThreshold?: Threshold;
|
|
1351
|
-
majorAxisThreshold?: Threshold;
|
|
1352
|
-
meanColor?: boolean;
|
|
1353
|
-
minorAxisThreshold?: Threshold;
|
|
1354
|
-
perimeterThreshold?: Threshold;
|
|
1355
|
-
constructor(connectivity: Connectivity);
|
|
1356
|
-
}
|
|
1357
|
-
export declare class Density {
|
|
1358
|
-
constructor(xy: number);
|
|
1359
|
-
constructor(xy: number, unit: DensityUnit);
|
|
1360
|
-
constructor(x: number, y: number, units: DensityUnit);
|
|
1361
|
-
readonly x: number;
|
|
1362
|
-
readonly y: number;
|
|
1363
|
-
readonly units: DensityUnit;
|
|
1364
|
-
}
|
|
1365
|
-
export declare class DistortSettings {
|
|
1366
|
-
constructor(method: DistortMethod);
|
|
1367
|
-
readonly method: DistortMethod;
|
|
1368
|
-
bestFit: boolean;
|
|
1369
|
-
scale?: number;
|
|
1370
|
-
viewport?: IMagickGeometry;
|
|
1371
|
-
}
|
|
1372
|
-
export interface IImageProfile {
|
|
1373
|
-
readonly name: string;
|
|
1374
|
-
readonly data: Uint8Array;
|
|
1375
|
-
}
|
|
1376
|
-
export declare class ImageProfile implements IImageProfile {
|
|
1377
|
-
constructor(name: string, data: Uint8Array);
|
|
1378
|
-
readonly name: string;
|
|
1379
|
-
readonly data: Uint8Array;
|
|
1380
|
-
}
|
|
1381
|
-
export declare class MagickSettings {
|
|
1382
|
-
antiAlias?: boolean;
|
|
1383
|
-
backgroundColor?: IMagickColor;
|
|
1384
|
-
colorSpace?: ColorSpace;
|
|
1385
|
-
colorType?: ColorType;
|
|
1386
|
-
compression?: CompressionMethod;
|
|
1387
|
-
debug?: boolean;
|
|
1388
|
-
depth?: number;
|
|
1389
|
-
endian?: Endian;
|
|
1390
|
-
fillColor?: IMagickColor;
|
|
1391
|
-
font?: string;
|
|
1392
|
-
fontPointsize?: number;
|
|
1393
|
-
format?: MagickFormat;
|
|
1394
|
-
interlace?: Interlace;
|
|
1395
|
-
strokeColor?: IMagickColor;
|
|
1396
|
-
strokeWidth?: number;
|
|
1397
|
-
textInterlineSpacing?: number;
|
|
1398
|
-
textKerning?: number;
|
|
1399
|
-
getDefine(name: string): string;
|
|
1400
|
-
getDefine(format: MagickFormat, name: string): string;
|
|
1401
|
-
setDefine(name: string, value: string): void;
|
|
1402
|
-
setDefine(format: MagickFormat, name: string, value: string): void;
|
|
1403
|
-
setDefine(format: MagickFormat, name: string, value: number): void;
|
|
1404
|
-
setDefine(format: MagickFormat, name: string, value: boolean): void;
|
|
1405
|
-
setDefines(defines: IDefines): void;
|
|
1406
|
-
private parseDefine;
|
|
1407
|
-
}
|
|
1408
|
-
export declare class MagickReadSettings extends MagickSettings {
|
|
1409
|
-
constructor(partialSettings?: Partial<MagickReadSettings>);
|
|
1410
|
-
height?: number;
|
|
1411
|
-
width?: number;
|
|
1412
|
-
private getSize;
|
|
1413
|
-
}
|
|
1414
|
-
export declare class MontageSettings {
|
|
1415
|
-
backgroundColor?: IMagickColor;
|
|
1416
|
-
borderColor?: IMagickColor;
|
|
1417
|
-
borderWidth?: number;
|
|
1418
|
-
fillColor?: IMagickColor;
|
|
1419
|
-
font?: string;
|
|
1420
|
-
fontPointsize?: number;
|
|
1421
|
-
frameGeometry?: IMagickGeometry;
|
|
1422
|
-
geometry?: IMagickGeometry;
|
|
1423
|
-
gravity?: Gravity;
|
|
1424
|
-
label?: string;
|
|
1425
|
-
shadow?: boolean;
|
|
1426
|
-
strokeColor?: IMagickColor;
|
|
1427
|
-
textureFileName?: string;
|
|
1428
|
-
tileGeometry?: IMagickGeometry;
|
|
1429
|
-
title?: string;
|
|
1430
|
-
transparentColor?: IMagickColor;
|
|
1431
|
-
}
|
|
1432
|
-
export interface IMagickImageCollection extends Array<IMagickImage>, IDisposable {
|
|
1433
|
-
appendHorizontally<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1434
|
-
appendHorizontally<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1435
|
-
appendVertically<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1436
|
-
appendVertically<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1437
|
-
clone<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1438
|
-
clone<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1439
|
-
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1440
|
-
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1441
|
-
flatten<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1442
|
-
flatten<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1443
|
-
merge<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1444
|
-
merge<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1445
|
-
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1446
|
-
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1447
|
-
mosaic<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1448
|
-
mosaic<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1449
|
-
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1450
|
-
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1451
|
-
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1452
|
-
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1453
|
-
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1454
|
-
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1455
|
-
}
|
|
1456
|
-
export declare class MagickImageCollection extends Array<MagickImage> implements IMagickImageCollection {
|
|
1457
|
-
private constructor();
|
|
1458
|
-
static create(): IMagickImageCollection;
|
|
1459
|
-
static create(array: ByteArray): IMagickImageCollection;
|
|
1460
|
-
dispose(): void;
|
|
1461
|
-
appendHorizontally<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1462
|
-
appendHorizontally<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1463
|
-
appendVertically<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1464
|
-
appendVertically<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1465
|
-
clone<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType;
|
|
1466
|
-
clone<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1467
|
-
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1468
|
-
evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1469
|
-
flatten<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1470
|
-
flatten<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1471
|
-
merge<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1472
|
-
merge<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1473
|
-
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1474
|
-
montage<TReturnType>(settings: MontageSettings, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1475
|
-
mosaic<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
|
|
1476
|
-
mosaic<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1477
|
-
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1478
|
-
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1479
|
-
write<TReturnType>(func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1480
|
-
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1481
|
-
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1482
|
-
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1483
|
-
private addImages;
|
|
1484
|
-
private attachImages;
|
|
1485
|
-
private static createObject;
|
|
1486
|
-
private createImage;
|
|
1487
|
-
private static createSettings;
|
|
1488
|
-
private detachImages;
|
|
1489
|
-
private getSettings;
|
|
1490
|
-
private mergeImages;
|
|
1491
|
-
private throwIfEmpty;
|
|
1492
|
-
private checkResult;
|
|
1493
|
-
}
|
|
1494
|
-
export declare class MorphologySettings {
|
|
1495
|
-
constructor(method: MorphologyMethod, kernel: Kernel | string, args?: string);
|
|
1496
|
-
channels: Channels;
|
|
1497
|
-
convolveBias: Percentage | undefined;
|
|
1498
|
-
convolveScale: IMagickGeometry | undefined;
|
|
1499
|
-
iterations: number;
|
|
1500
|
-
readonly kernel: string;
|
|
1501
|
-
readonly method: MorphologyMethod;
|
|
1305
|
+
Meta1 = 11,
|
|
1306
|
+
Meta2 = 12,
|
|
1307
|
+
Meta3 = 13,
|
|
1308
|
+
Meta4 = 14,
|
|
1309
|
+
Meta5 = 15,
|
|
1310
|
+
Meta6 = 16,
|
|
1311
|
+
Meta7 = 17,
|
|
1312
|
+
Meta8 = 18,
|
|
1313
|
+
Meta9 = 19,
|
|
1314
|
+
Meta10 = 20,
|
|
1315
|
+
Meta11 = 21,
|
|
1316
|
+
Meta12 = 22,
|
|
1317
|
+
Meta13 = 23,
|
|
1318
|
+
Meta14 = 24,
|
|
1319
|
+
Meta15 = 25,
|
|
1320
|
+
Meta16 = 26,
|
|
1321
|
+
Meta17 = 27,
|
|
1322
|
+
Meta18 = 28,
|
|
1323
|
+
Meta19 = 29,
|
|
1324
|
+
Meta20 = 30,
|
|
1325
|
+
Meta21 = 31,
|
|
1326
|
+
Meta22 = 32,
|
|
1327
|
+
Meta23 = 33,
|
|
1328
|
+
Meta24 = 34,
|
|
1329
|
+
Meta25 = 35,
|
|
1330
|
+
Meta26 = 36,
|
|
1331
|
+
Meta27 = 37,
|
|
1332
|
+
Meta28 = 38,
|
|
1333
|
+
Meta29 = 39,
|
|
1334
|
+
Meta30 = 40,
|
|
1335
|
+
Meta31 = 41,
|
|
1336
|
+
Meta32 = 42,
|
|
1337
|
+
Meta33 = 43,
|
|
1338
|
+
Meta34 = 44,
|
|
1339
|
+
Meta35 = 45,
|
|
1340
|
+
Meta36 = 46,
|
|
1341
|
+
Meta37 = 47,
|
|
1342
|
+
Meta38 = 48,
|
|
1343
|
+
Meta39 = 49,
|
|
1344
|
+
Meta40 = 50,
|
|
1345
|
+
Meta41 = 51,
|
|
1346
|
+
Meta42 = 52,
|
|
1347
|
+
Meta43 = 53,
|
|
1348
|
+
Meta44 = 54,
|
|
1349
|
+
Meta45 = 55,
|
|
1350
|
+
Meta46 = 56,
|
|
1351
|
+
Meta47 = 57,
|
|
1352
|
+
Meta48 = 58,
|
|
1353
|
+
Meta49 = 59,
|
|
1354
|
+
Meta50 = 60,
|
|
1355
|
+
Meta51 = 61,
|
|
1356
|
+
Meta52 = 62,
|
|
1357
|
+
Composite = 64
|
|
1502
1358
|
}
|
|
1503
1359
|
export type quantumArray = Uint8Array;
|
|
1504
1360
|
export interface IPixelCollection extends IDisposable {
|
|
@@ -1522,6 +1378,58 @@ export declare class PixelCollection extends NativeInstance implements IPixelCol
|
|
|
1522
1378
|
toByteArray(x: number, y: number, width: number, height: number, mapping: string): Uint8Array | null;
|
|
1523
1379
|
private use;
|
|
1524
1380
|
}
|
|
1381
|
+
export declare enum PixelIntensityMethod {
|
|
1382
|
+
Undefined = 0,
|
|
1383
|
+
Average = 1,
|
|
1384
|
+
Brightness = 2,
|
|
1385
|
+
Lightness = 3,
|
|
1386
|
+
MS = 4,
|
|
1387
|
+
Rec601Luma = 5,
|
|
1388
|
+
Rec601Luminance = 6,
|
|
1389
|
+
Rec709Luma = 7,
|
|
1390
|
+
Rec709Luminance = 8,
|
|
1391
|
+
RMS = 9
|
|
1392
|
+
}
|
|
1393
|
+
export declare enum PixelInterpolateMethod {
|
|
1394
|
+
Undefined = 0,
|
|
1395
|
+
Average = 1,
|
|
1396
|
+
Average9 = 2,
|
|
1397
|
+
Average16 = 3,
|
|
1398
|
+
Background = 4,
|
|
1399
|
+
Bilinear = 5,
|
|
1400
|
+
Blend = 6,
|
|
1401
|
+
Catrom = 7,
|
|
1402
|
+
Integer = 8,
|
|
1403
|
+
Mesh = 9,
|
|
1404
|
+
Nearest = 10,
|
|
1405
|
+
Spline = 11
|
|
1406
|
+
}
|
|
1407
|
+
declare class ProgressEvent$1 {
|
|
1408
|
+
readonly origin: string | null;
|
|
1409
|
+
readonly progress: Percentage;
|
|
1410
|
+
cancel: boolean;
|
|
1411
|
+
}
|
|
1412
|
+
export declare enum DitherMethod {
|
|
1413
|
+
Undefined = 0,
|
|
1414
|
+
No = 1,
|
|
1415
|
+
Riemersma = 2,
|
|
1416
|
+
FloydSteinberg = 3
|
|
1417
|
+
}
|
|
1418
|
+
export declare class QuantizeSettings {
|
|
1419
|
+
constructor();
|
|
1420
|
+
colors: number;
|
|
1421
|
+
colorSpace: ColorSpace;
|
|
1422
|
+
ditherMethod?: DitherMethod;
|
|
1423
|
+
measureErrors: boolean;
|
|
1424
|
+
treeDepth: number;
|
|
1425
|
+
}
|
|
1426
|
+
export declare enum RenderingIntent {
|
|
1427
|
+
Undefined = 0,
|
|
1428
|
+
Saturation = 1,
|
|
1429
|
+
Perceptual = 2,
|
|
1430
|
+
Absolute = 3,
|
|
1431
|
+
Relative = 4
|
|
1432
|
+
}
|
|
1525
1433
|
export interface IChannelStatistics {
|
|
1526
1434
|
readonly channel: PixelChannel;
|
|
1527
1435
|
readonly depth: number;
|
|
@@ -1538,6 +1446,81 @@ export interface IStatistics {
|
|
|
1538
1446
|
composite(): IChannelStatistics;
|
|
1539
1447
|
getChannel(channel: PixelChannel): IChannelStatistics | null;
|
|
1540
1448
|
}
|
|
1449
|
+
export declare enum VirtualPixelMethod {
|
|
1450
|
+
Undefined = 0,
|
|
1451
|
+
Background = 1,
|
|
1452
|
+
Dither = 2,
|
|
1453
|
+
Edge = 3,
|
|
1454
|
+
Mirror = 4,
|
|
1455
|
+
Random = 5,
|
|
1456
|
+
Tile = 6,
|
|
1457
|
+
Transparent = 7,
|
|
1458
|
+
Mask = 8,
|
|
1459
|
+
Black = 9,
|
|
1460
|
+
Gray = 10,
|
|
1461
|
+
White = 11,
|
|
1462
|
+
HorizontalTile = 12,
|
|
1463
|
+
VerticalTile = 13,
|
|
1464
|
+
HorizontalTileEdge = 14,
|
|
1465
|
+
VerticalTileEdge = 15,
|
|
1466
|
+
CheckerTile = 16
|
|
1467
|
+
}
|
|
1468
|
+
export declare enum MagickErrorSeverity {
|
|
1469
|
+
Warning = 300,
|
|
1470
|
+
ResourceLimitWarning = 300,
|
|
1471
|
+
TypeWarning = 305,
|
|
1472
|
+
OptionWarning = 310,
|
|
1473
|
+
DelegateWarning = 315,
|
|
1474
|
+
MissingDelegateWarning = 320,
|
|
1475
|
+
CorruptImageWarning = 325,
|
|
1476
|
+
FileOpenWarning = 330,
|
|
1477
|
+
BlobWarning = 335,
|
|
1478
|
+
StreamWarning = 340,
|
|
1479
|
+
CacheWarning = 345,
|
|
1480
|
+
CoderWarning = 350,
|
|
1481
|
+
FilterWarning = 352,
|
|
1482
|
+
ModuleWarning = 355,
|
|
1483
|
+
DrawWarning = 360,
|
|
1484
|
+
ImageWarning = 365,
|
|
1485
|
+
WandWarning = 370,
|
|
1486
|
+
RandomWarning = 375,
|
|
1487
|
+
XServerWarning = 380,
|
|
1488
|
+
MonitorWarning = 385,
|
|
1489
|
+
RegistryWarning = 390,
|
|
1490
|
+
ConfigureWarning = 395,
|
|
1491
|
+
PolicyWarning = 399,
|
|
1492
|
+
Error = 400,
|
|
1493
|
+
ResourceLimitError = 400,
|
|
1494
|
+
TypeError = 405,
|
|
1495
|
+
OptionError = 410,
|
|
1496
|
+
DelegateError = 415,
|
|
1497
|
+
MissingDelegateError = 420,
|
|
1498
|
+
CorruptImageError = 425,
|
|
1499
|
+
FileOpenError = 430,
|
|
1500
|
+
BlobError = 435,
|
|
1501
|
+
StreamError = 440,
|
|
1502
|
+
CacheError = 445,
|
|
1503
|
+
CoderError = 450,
|
|
1504
|
+
FilterError = 452,
|
|
1505
|
+
ModuleError = 455,
|
|
1506
|
+
DrawError = 460,
|
|
1507
|
+
ImageError = 465,
|
|
1508
|
+
WandError = 470,
|
|
1509
|
+
RandomError = 475,
|
|
1510
|
+
XServerError = 480,
|
|
1511
|
+
MonitorError = 485,
|
|
1512
|
+
RegistryError = 490,
|
|
1513
|
+
ConfigureError = 495,
|
|
1514
|
+
PolicyError = 499
|
|
1515
|
+
}
|
|
1516
|
+
export declare class MagickError extends Error {
|
|
1517
|
+
private _relatedErrors;
|
|
1518
|
+
readonly severity: MagickErrorSeverity;
|
|
1519
|
+
get relatedErrors(): ReadonlyArray<MagickError>;
|
|
1520
|
+
}
|
|
1521
|
+
export declare class WarningEvent {
|
|
1522
|
+
readonly error: MagickError;
|
|
1523
|
+
}
|
|
1541
1524
|
export interface IMagickImage extends IDisposable {
|
|
1542
1525
|
animationDelay: number;
|
|
1543
1526
|
animationIterations: number;
|
|
@@ -1576,10 +1559,11 @@ export interface IMagickImage extends IDisposable {
|
|
|
1576
1559
|
readonly isOpaque: boolean;
|
|
1577
1560
|
label: string | null;
|
|
1578
1561
|
matteColor: IMagickColor;
|
|
1579
|
-
orientation: OrientationType;
|
|
1580
|
-
|
|
1581
|
-
onProgress?: (event: ProgressEvent) => void;
|
|
1562
|
+
orientation: OrientationType$1;
|
|
1563
|
+
onProgress?: (event: ProgressEvent$1) => void;
|
|
1582
1564
|
onWarning?: (event: WarningEvent) => void;
|
|
1565
|
+
page: IMagickGeometry;
|
|
1566
|
+
readonly profileNames: ReadonlyArray<string>;
|
|
1583
1567
|
quality: number;
|
|
1584
1568
|
renderingIntent: RenderingIntent;
|
|
1585
1569
|
readonly settings: MagickSettings;
|
|
@@ -1587,7 +1571,14 @@ export interface IMagickImage extends IDisposable {
|
|
|
1587
1571
|
readonly totalColors: number;
|
|
1588
1572
|
virtualPixelMethod: VirtualPixelMethod;
|
|
1589
1573
|
width: number;
|
|
1590
|
-
|
|
1574
|
+
adaptiveBlur(): void;
|
|
1575
|
+
adaptiveBlur(radius: number): void;
|
|
1576
|
+
adaptiveBlur(radius: number, sigma: number): void;
|
|
1577
|
+
alpha(value: AlphaOption$1): void;
|
|
1578
|
+
autoGamma(): void;
|
|
1579
|
+
autoGamma(channels: Channels): void;
|
|
1580
|
+
autoLevel(): void;
|
|
1581
|
+
autoLevel(channels: Channels): void;
|
|
1591
1582
|
autoOrient(): void;
|
|
1592
1583
|
autoThreshold(method: AutoThresholdMethod): void;
|
|
1593
1584
|
blur(): void;
|
|
@@ -1663,6 +1654,9 @@ export interface IMagickImage extends IDisposable {
|
|
|
1663
1654
|
extent(geometry: IMagickGeometry, backgroundColor: IMagickColor): void;
|
|
1664
1655
|
flip(): void;
|
|
1665
1656
|
flop(): void;
|
|
1657
|
+
gaussianBlur(radius: number): void;
|
|
1658
|
+
gaussianBlur(radius: number, sigma: number): void;
|
|
1659
|
+
gaussianBlur(radius: number, sigma: number, channels: Channels): void;
|
|
1666
1660
|
getArtifact(name: string): string | null;
|
|
1667
1661
|
getAttribute(name: string): string | null;
|
|
1668
1662
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType;
|
|
@@ -1676,8 +1670,7 @@ export interface IMagickImage extends IDisposable {
|
|
|
1676
1670
|
inverseContrast(): void;
|
|
1677
1671
|
inverseLevel(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
1678
1672
|
inverseLevel(blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1679
|
-
inverseLevel(
|
|
1680
|
-
inverseLevel(channels: Channels, blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1673
|
+
inverseLevel(blackPoint: Percentage, whitePoint: Percentage, gamma: number, channels: Channels): void;
|
|
1681
1674
|
inverseOpaque(target: IMagickColor, fill: IMagickColor): void;
|
|
1682
1675
|
inverseSigmoidalContrast(contrast: number): void;
|
|
1683
1676
|
inverseSigmoidalContrast(contrast: number, midpoint: Percentage): void;
|
|
@@ -1686,8 +1679,7 @@ export interface IMagickImage extends IDisposable {
|
|
|
1686
1679
|
inverseTransparent(color: IMagickColor): void;
|
|
1687
1680
|
level(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
1688
1681
|
level(blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1689
|
-
level(
|
|
1690
|
-
level(channels: Channels, blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1682
|
+
level(blackPoint: Percentage, whitePoint: Percentage, gamma: number, channels: Channels): void;
|
|
1691
1683
|
linearStretch(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
1692
1684
|
liquidRescale(geometry: IMagickGeometry): void;
|
|
1693
1685
|
liquidRescale(width: number, height: number): void;
|
|
@@ -1706,6 +1698,7 @@ export interface IMagickImage extends IDisposable {
|
|
|
1706
1698
|
opaque(target: IMagickColor, fill: IMagickColor): void;
|
|
1707
1699
|
ping(fileName: string, settings?: MagickReadSettings): void;
|
|
1708
1700
|
ping(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1701
|
+
quantize(settings: QuantizeSettings): void;
|
|
1709
1702
|
read(color: IMagickColor, width: number, height: number): void;
|
|
1710
1703
|
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1711
1704
|
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
@@ -1761,7 +1754,7 @@ export interface IMagickImage extends IDisposable {
|
|
|
1761
1754
|
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1762
1755
|
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
1763
1756
|
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
1764
|
-
writeToCanvas(canvas: HTMLCanvasElement): void;
|
|
1757
|
+
writeToCanvas(canvas: HTMLCanvasElement, settings?: CanvasRenderingContext2DSettings): void;
|
|
1765
1758
|
}
|
|
1766
1759
|
export declare class MagickImage extends NativeInstance implements IMagickImage {
|
|
1767
1760
|
private readonly _settings;
|
|
@@ -1829,14 +1822,15 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1829
1822
|
set label(value: string | null);
|
|
1830
1823
|
get matteColor(): IMagickColor;
|
|
1831
1824
|
set matteColor(value: IMagickColor);
|
|
1832
|
-
get orientation(): OrientationType;
|
|
1833
|
-
set orientation(value: OrientationType);
|
|
1834
|
-
get
|
|
1835
|
-
set
|
|
1836
|
-
get onProgress(): ((event: ProgressEvent) => number) | undefined;
|
|
1837
|
-
set onProgress(value: ((event: ProgressEvent) => number) | undefined);
|
|
1825
|
+
get orientation(): OrientationType$1;
|
|
1826
|
+
set orientation(value: OrientationType$1);
|
|
1827
|
+
get onProgress(): ((event: ProgressEvent$1) => number) | undefined;
|
|
1828
|
+
set onProgress(value: ((event: ProgressEvent$1) => number) | undefined);
|
|
1838
1829
|
get onWarning(): ((event: WarningEvent) => number) | undefined;
|
|
1839
1830
|
set onWarning(value: ((event: WarningEvent) => number) | undefined);
|
|
1831
|
+
get page(): IMagickGeometry;
|
|
1832
|
+
set page(value: IMagickGeometry);
|
|
1833
|
+
get profileNames(): ReadonlyArray<string>;
|
|
1840
1834
|
get quality(): number;
|
|
1841
1835
|
set quality(value: number);
|
|
1842
1836
|
get renderingIntent(): RenderingIntent;
|
|
@@ -1847,7 +1841,12 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1847
1841
|
get virtualPixelMethod(): VirtualPixelMethod;
|
|
1848
1842
|
set virtualPixelMethod(value: VirtualPixelMethod);
|
|
1849
1843
|
get width(): number;
|
|
1850
|
-
|
|
1844
|
+
adaptiveBlur(): void;
|
|
1845
|
+
adaptiveBlur(radius: number): void;
|
|
1846
|
+
adaptiveBlur(radius: number, sigma: number): void;
|
|
1847
|
+
alpha(value: AlphaOption$1): void;
|
|
1848
|
+
autoGamma(): void;
|
|
1849
|
+
autoLevel(): void;
|
|
1851
1850
|
autoOrient(): void;
|
|
1852
1851
|
autoThreshold(method: AutoThresholdMethod): void;
|
|
1853
1852
|
blur(): void;
|
|
@@ -1927,6 +1926,9 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1927
1926
|
extent(geometry: IMagickGeometry, backgroundColor: IMagickColor): void;
|
|
1928
1927
|
flip(): void;
|
|
1929
1928
|
flop(): void;
|
|
1929
|
+
gaussianBlur(radius: number): void;
|
|
1930
|
+
gaussianBlur(radius: number, sigma: number): void;
|
|
1931
|
+
gaussianBlur(radius: number, sigma: number, channels: Channels): void;
|
|
1930
1932
|
getArtifact(name: string): string | null;
|
|
1931
1933
|
getAttribute(name: string): string | null;
|
|
1932
1934
|
getPixels<TReturnType>(func: (pixels: IPixelCollection) => TReturnType): TReturnType;
|
|
@@ -1939,8 +1941,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1939
1941
|
inverseContrast: () => void;
|
|
1940
1942
|
inverseLevel(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
1941
1943
|
inverseLevel(blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1942
|
-
inverseLevel(
|
|
1943
|
-
inverseLevel(channels: Channels, blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1944
|
+
inverseLevel(blackPoint: Percentage, whitePoint: Percentage, gamma: number, channels: Channels): void;
|
|
1944
1945
|
inverseOpaque: (target: IMagickColor, fill: IMagickColor) => void;
|
|
1945
1946
|
inverseSigmoidalContrast(contrast: number): void;
|
|
1946
1947
|
inverseSigmoidalContrast(contrast: number, midpoint: Percentage): void;
|
|
@@ -1949,8 +1950,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1949
1950
|
inverseTransparent: (color: IMagickColor) => void;
|
|
1950
1951
|
level(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
1951
1952
|
level(blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1952
|
-
level(
|
|
1953
|
-
level(channels: Channels, blackPoint: Percentage, whitePoint: Percentage, gamma: number): void;
|
|
1953
|
+
level(blackPoint: Percentage, whitePoint: Percentage, gamma: number, channels: Channels): void;
|
|
1954
1954
|
linearStretch(blackPoint: Percentage, whitePoint: Percentage): void;
|
|
1955
1955
|
liquidRescale(geometry: IMagickGeometry): void;
|
|
1956
1956
|
liquidRescale(width: number, height: number): void;
|
|
@@ -1967,6 +1967,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
1967
1967
|
opaque: (target: IMagickColor, fill: IMagickColor) => void;
|
|
1968
1968
|
ping(fileName: string, settings?: MagickReadSettings): void;
|
|
1969
1969
|
ping(array: ByteArray, settings?: MagickReadSettings): void;
|
|
1970
|
+
quantize(settings: QuantizeSettings): void;
|
|
1970
1971
|
read(color: IMagickColor, width: number, height: number): void;
|
|
1971
1972
|
read(fileName: string, settings?: MagickReadSettings): void;
|
|
1972
1973
|
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
@@ -2018,7 +2019,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
2018
2019
|
write<TReturnType>(func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
2019
2020
|
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => TReturnType): TReturnType;
|
|
2020
2021
|
write<TReturnType>(format: MagickFormat, func: (data: Uint8Array) => Promise<TReturnType>): Promise<TReturnType>;
|
|
2021
|
-
writeToCanvas(canvas: HTMLCanvasElement): void;
|
|
2022
|
+
writeToCanvas(canvas: HTMLCanvasElement, settings?: CanvasRenderingContext2DSettings): void;
|
|
2022
2023
|
protected onDispose(): void;
|
|
2023
2024
|
private _contrast;
|
|
2024
2025
|
private _opaque;
|
|
@@ -2034,6 +2035,98 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
|
|
|
2034
2035
|
private useException;
|
|
2035
2036
|
private useExceptionPointer;
|
|
2036
2037
|
}
|
|
2038
|
+
export declare class TypeMetric {
|
|
2039
|
+
private constructor();
|
|
2040
|
+
readonly ascent: number;
|
|
2041
|
+
readonly descent: number;
|
|
2042
|
+
readonly maxHorizontalAdvance: number;
|
|
2043
|
+
readonly textHeight: number;
|
|
2044
|
+
readonly textWidth: number;
|
|
2045
|
+
readonly underlinePosition: number;
|
|
2046
|
+
readonly underlineThickness: number;
|
|
2047
|
+
}
|
|
2048
|
+
export declare class Drawables {
|
|
2049
|
+
private _drawables;
|
|
2050
|
+
disableStrokeAntialias(): Drawables;
|
|
2051
|
+
enableStrokeAntialias(): Drawables;
|
|
2052
|
+
fillColor(color: IMagickColor): Drawables;
|
|
2053
|
+
fillOpacity(opacity: Percentage): Drawables;
|
|
2054
|
+
font(font: string): Drawables;
|
|
2055
|
+
fontPointSize(pointSize: number): Drawables;
|
|
2056
|
+
fontTypeMetrics(text: string, ignoreNewlines?: boolean): TypeMetric | null;
|
|
2057
|
+
gravity(value: Gravity): Drawables;
|
|
2058
|
+
line(startX: number, startY: number, endX: number, endY: number): Drawables;
|
|
2059
|
+
point(x: number, y: number): Drawables;
|
|
2060
|
+
rectangle(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number): Drawables;
|
|
2061
|
+
roundRectangle(upperLeftX: number, upperLeftY: number, lowerRightX: number, lowerRightY: number, cornerWidth: number, cornerHeight: number): Drawables;
|
|
2062
|
+
strokeColor(color: IMagickColor): Drawables;
|
|
2063
|
+
strokeWidth(width: number): Drawables;
|
|
2064
|
+
text(x: number, y: number, value: string): Drawables;
|
|
2065
|
+
textAlignment(alignment: TextAlignment): Drawables;
|
|
2066
|
+
textDecoration(decoration: TextDecoration): Drawables;
|
|
2067
|
+
textInterlineSpacing(spacing: number): Drawables;
|
|
2068
|
+
textInterwordSpacing(spacing: number): Drawables;
|
|
2069
|
+
textKerning(kerning: number): Drawables;
|
|
2070
|
+
textUnderColor(color: IMagickColor): Drawables;
|
|
2071
|
+
draw(image: IMagickImage): Drawables;
|
|
2072
|
+
}
|
|
2073
|
+
export declare enum LogEventTypes {
|
|
2074
|
+
None = 0,
|
|
2075
|
+
Accelerate = 1,
|
|
2076
|
+
Annotate = 2,
|
|
2077
|
+
Blob = 4,
|
|
2078
|
+
Cache = 8,
|
|
2079
|
+
Coder = 16,
|
|
2080
|
+
Configure = 32,
|
|
2081
|
+
Deprecate = 64,
|
|
2082
|
+
Draw = 128,
|
|
2083
|
+
Exception = 256,
|
|
2084
|
+
Image = 512,
|
|
2085
|
+
Locale = 1024,
|
|
2086
|
+
Module = 2048,
|
|
2087
|
+
Pixel = 4096,
|
|
2088
|
+
Policy = 8192,
|
|
2089
|
+
Resource = 16384,
|
|
2090
|
+
Trace = 32768,
|
|
2091
|
+
Transform = 65536,
|
|
2092
|
+
User = 131072,
|
|
2093
|
+
Wand = 262144,
|
|
2094
|
+
Detailed = 2147450879,
|
|
2095
|
+
All = 2147483647
|
|
2096
|
+
}
|
|
2097
|
+
export declare class LogEvent {
|
|
2098
|
+
constructor(eventType: LogEventTypes, message?: string);
|
|
2099
|
+
readonly eventType: LogEventTypes;
|
|
2100
|
+
readonly message: string;
|
|
2101
|
+
}
|
|
2102
|
+
export declare enum DngInterpolation {
|
|
2103
|
+
Disabled = -1,
|
|
2104
|
+
Linear = 0,
|
|
2105
|
+
Vng = 1,
|
|
2106
|
+
Ppg = 2,
|
|
2107
|
+
Ahd = 3,
|
|
2108
|
+
DCB = 4,
|
|
2109
|
+
Dht = 11,
|
|
2110
|
+
ModifiedAhd = 12
|
|
2111
|
+
}
|
|
2112
|
+
export declare enum DngOutputColor {
|
|
2113
|
+
Raw = 0,
|
|
2114
|
+
SRGB = 1,
|
|
2115
|
+
AdobeRGB = 2,
|
|
2116
|
+
WideGamutRGB = 3,
|
|
2117
|
+
KodakProPhotoRGB = 4,
|
|
2118
|
+
XYZ = 5,
|
|
2119
|
+
ACES = 6
|
|
2120
|
+
}
|
|
2121
|
+
export declare class DngReadDefines extends DefinesCreator {
|
|
2122
|
+
constructor();
|
|
2123
|
+
disableAutoBrightness?: boolean;
|
|
2124
|
+
interpolationQuality?: DngInterpolation;
|
|
2125
|
+
outputColor?: DngOutputColor;
|
|
2126
|
+
useAutoWhitebalance?: boolean;
|
|
2127
|
+
useCameraWhitebalance?: boolean;
|
|
2128
|
+
getDefines(): IDefine[];
|
|
2129
|
+
}
|
|
2037
2130
|
export declare class ImageMagick {
|
|
2038
2131
|
private readonly loader;
|
|
2039
2132
|
private api?;
|
|
@@ -2063,8 +2156,9 @@ export declare class ImageMagick {
|
|
|
2063
2156
|
static readCollection<TReturnType>(fileName: string, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
|
|
2064
2157
|
static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => TReturnType, settings?: CanvasRenderingContext2DSettings): TReturnType;
|
|
2065
2158
|
static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => Promise<TReturnType>, settings?: CanvasRenderingContext2DSettings): Promise<TReturnType>;
|
|
2159
|
+
private writeConfigurationFiles;
|
|
2066
2160
|
}
|
|
2067
|
-
export declare function initializeImageMagick(
|
|
2161
|
+
export declare function initializeImageMagick(wasmLocationDataOrAssembly: URL | ByteArray | WebAssembly.Module, configurationFiles?: IConfigurationFiles): Promise<void>;
|
|
2068
2162
|
export declare class MagickColors {
|
|
2069
2163
|
static get None(): IMagickColor;
|
|
2070
2164
|
static get Transparent(): IMagickColor;
|
|
@@ -2217,6 +2311,41 @@ export interface IMagickFormatInfo {
|
|
|
2217
2311
|
readonly supportsReading: boolean;
|
|
2218
2312
|
readonly supportsWriting: boolean;
|
|
2219
2313
|
}
|
|
2314
|
+
export interface IMagickImageInfo {
|
|
2315
|
+
readonly colorSpace: ColorSpace;
|
|
2316
|
+
readonly compression: CompressionMethod;
|
|
2317
|
+
readonly density: Density;
|
|
2318
|
+
readonly format: MagickFormat;
|
|
2319
|
+
readonly height: number;
|
|
2320
|
+
readonly interlace: Interlace;
|
|
2321
|
+
readonly orientation: OrientationType$1;
|
|
2322
|
+
readonly quality: number;
|
|
2323
|
+
readonly width: number;
|
|
2324
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
2325
|
+
}
|
|
2326
|
+
export declare class MagickImageInfo implements IMagickImageInfo {
|
|
2327
|
+
private _colorSpace;
|
|
2328
|
+
private _compression;
|
|
2329
|
+
private _density;
|
|
2330
|
+
private _format;
|
|
2331
|
+
private _height;
|
|
2332
|
+
private _interlace;
|
|
2333
|
+
private _orientation;
|
|
2334
|
+
private _quality;
|
|
2335
|
+
private _width;
|
|
2336
|
+
get colorSpace(): ColorSpace;
|
|
2337
|
+
get compression(): CompressionMethod;
|
|
2338
|
+
get density(): Density;
|
|
2339
|
+
get format(): MagickFormat;
|
|
2340
|
+
get height(): number;
|
|
2341
|
+
get interlace(): Interlace;
|
|
2342
|
+
get orientation(): OrientationType$1;
|
|
2343
|
+
get quality(): number;
|
|
2344
|
+
get width(): number;
|
|
2345
|
+
constructor();
|
|
2346
|
+
read(array: ByteArray, settings?: MagickReadSettings): void;
|
|
2347
|
+
static create(array: ByteArray, settings?: MagickReadSettings): IMagickImageInfo;
|
|
2348
|
+
}
|
|
2220
2349
|
export declare class Magick {
|
|
2221
2350
|
static get delegates(): string;
|
|
2222
2351
|
static get features(): string;
|
|
@@ -2234,4 +2363,10 @@ export declare class Quantum {
|
|
|
2234
2363
|
static get max(): number;
|
|
2235
2364
|
}
|
|
2236
2365
|
|
|
2366
|
+
export {
|
|
2367
|
+
AlphaOption$1 as AlphaOption,
|
|
2368
|
+
OrientationType$1 as OrientationType,
|
|
2369
|
+
ProgressEvent$1 as ProgressEvent,
|
|
2370
|
+
};
|
|
2371
|
+
|
|
2237
2372
|
export {};
|