@imagemagick/magick-wasm 0.0.26 → 0.0.28

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 CHANGED
@@ -7,7 +7,7 @@ Licensed under the Apache License, Version 2.0.
7
7
 
8
8
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
9
9
 
10
- [ ImageMagick 7.1.1-23 (2023-12-10) ] copyright:
10
+ [ ImageMagick 7.1.1-27 (2024-01-21) ] copyright:
11
11
 
12
12
  ImageMagick License
13
13
  https://imagemagick.org/script/license.php
@@ -174,7 +174,7 @@ THE SOFTWARE.
174
174
 
175
175
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
176
176
 
177
- [ de265 1.0.14 (2023-11-21) ] copyright:
177
+ [ de265 1.0.15 (2023-12-20) ] copyright:
178
178
 
179
179
  * The library `libde265` is distributed under the terms of the GNU Lesser General Public License.
180
180
  * The sample applications are distributed under the terms of the MIT license.
@@ -1813,7 +1813,7 @@ That's all there is to it!
1813
1813
 
1814
1814
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1815
1815
 
1816
- [ heif 1.17.5 (2023-11-21) ] copyright:
1816
+ [ heif 1.17.6 (2023-12-20) ] copyright:
1817
1817
 
1818
1818
  * The library `libheif` is distributed under the terms of the GNU Lesser General Public License.
1819
1819
  * The sample applications are distributed under the terms of the MIT License.
@@ -3031,7 +3031,7 @@ that were granted to the IJG for code derived from their software.
3031
3031
 
3032
3032
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3033
3033
 
3034
- [ jpeg-xl 0.8.2 (2023-06-14) ] copyright:
3034
+ [ jpeg-xl 0.9.0 (2023-12-22) ] copyright:
3035
3035
 
3036
3036
  Copyright (c) the JPEG XL Project Authors.
3037
3037
  All rights reserved.
@@ -3443,7 +3443,7 @@ be appreciated.
3443
3443
 
3444
3444
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3445
3445
 
3446
- [ raw 0.21.1 (2023-01-05) ] copyright:
3446
+ [ raw 0.21.2 (2023-12-19) ] copyright:
3447
3447
 
3448
3448
  ** LibRaw: Raw images processing library **
3449
3449
 
@@ -3538,7 +3538,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3538
3538
 
3539
3539
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3540
3540
 
3541
- [ xml 2.12.2 (2023-12-05) ] copyright:
3541
+ [ xml 2.12.3 (2023-12-12) ] copyright:
3542
3542
 
3543
3543
  Except where otherwise noted in the source code (e.g. the files dict.c,
3544
3544
  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.26).
24
+ The release notes can be found on [GitHub](https://github.com/dlemstra/magick-wasm/releases/tag/0.0.28).
25
25
 
26
26
  ## Donate
27
27
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,22 @@
1
- // Generated by dts-bundle-generator v9.0.0
1
+ // Generated by dts-bundle-generator v9.2.4
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",
@@ -535,7 +551,7 @@ export declare class DrawableText implements IDrawable {
535
551
  constructor(x: number, y: number, value: string);
536
552
  draw(wand: IDrawingWand): void;
537
553
  }
538
- export declare enum AlphaOption {
554
+ declare enum AlphaOption$1 {
539
555
  Undefined = 0,
540
556
  Activate = 1,
541
557
  Associate = 2,
@@ -828,6 +844,12 @@ export declare enum DistortMethod {
828
844
  Sentinel = 18,
829
845
  RigidAffine = 19
830
846
  }
847
+ export declare enum DitherMethod {
848
+ Undefined = 0,
849
+ No = 1,
850
+ Riemersma = 2,
851
+ FloydSteinberg = 3
852
+ }
831
853
  export declare enum Endian {
832
854
  Undefined = 0,
833
855
  LSB = 1,
@@ -1071,7 +1093,7 @@ export declare enum MorphologyMethod {
1071
1093
  Distance = 21,
1072
1094
  Voronoi = 22
1073
1095
  }
1074
- export declare enum OrientationType {
1096
+ declare enum OrientationType$1 {
1075
1097
  Undefined = 0,
1076
1098
  TopLeft = 1,
1077
1099
  TopRight = 2,
@@ -1205,7 +1227,7 @@ export declare class LogEvent {
1205
1227
  readonly eventType: LogEventTypes;
1206
1228
  readonly message: string;
1207
1229
  }
1208
- export declare class ProgressEvent {
1230
+ declare class ProgressEvent$1 {
1209
1231
  readonly origin: string | null;
1210
1232
  readonly progress: Percentage;
1211
1233
  cancel: boolean;
@@ -1436,6 +1458,7 @@ export interface IMagickImageCollection extends Array<IMagickImage>, IDisposable
1436
1458
  appendVertically<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
1437
1459
  clone<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType;
1438
1460
  clone<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
1461
+ coalesce(): void;
1439
1462
  evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => TReturnType): TReturnType;
1440
1463
  evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
1441
1464
  flatten<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
@@ -1464,6 +1487,7 @@ export declare class MagickImageCollection extends Array<MagickImage> implements
1464
1487
  appendVertically<TReturnType>(func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
1465
1488
  clone<TReturnType>(func: (images: IMagickImageCollection) => TReturnType): TReturnType;
1466
1489
  clone<TReturnType>(func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
1490
+ coalesce(): void;
1467
1491
  evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => TReturnType): TReturnType;
1468
1492
  evaluate<TReturnType>(evaluateOperator: EvaluateOperator, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
1469
1493
  flatten<TReturnType>(func: (image: IMagickImage) => TReturnType): TReturnType;
@@ -1522,6 +1546,14 @@ export declare class PixelCollection extends NativeInstance implements IPixelCol
1522
1546
  toByteArray(x: number, y: number, width: number, height: number, mapping: string): Uint8Array | null;
1523
1547
  private use;
1524
1548
  }
1549
+ export declare class QuantizeSettings {
1550
+ constructor();
1551
+ colors: number;
1552
+ colorSpace: ColorSpace;
1553
+ ditherMethod?: DitherMethod;
1554
+ measureErrors: boolean;
1555
+ treeDepth: number;
1556
+ }
1525
1557
  export interface IChannelStatistics {
1526
1558
  readonly channel: PixelChannel;
1527
1559
  readonly depth: number;
@@ -1576,9 +1608,9 @@ export interface IMagickImage extends IDisposable {
1576
1608
  readonly isOpaque: boolean;
1577
1609
  label: string | null;
1578
1610
  matteColor: IMagickColor;
1579
- orientation: OrientationType;
1611
+ orientation: OrientationType$1;
1580
1612
  page: IMagickGeometry;
1581
- onProgress?: (event: ProgressEvent) => void;
1613
+ onProgress?: (event: ProgressEvent$1) => void;
1582
1614
  onWarning?: (event: WarningEvent) => void;
1583
1615
  quality: number;
1584
1616
  renderingIntent: RenderingIntent;
@@ -1587,7 +1619,7 @@ export interface IMagickImage extends IDisposable {
1587
1619
  readonly totalColors: number;
1588
1620
  virtualPixelMethod: VirtualPixelMethod;
1589
1621
  width: number;
1590
- alpha(value: AlphaOption): void;
1622
+ alpha(value: AlphaOption$1): void;
1591
1623
  autoOrient(): void;
1592
1624
  autoThreshold(method: AutoThresholdMethod): void;
1593
1625
  blur(): void;
@@ -1706,10 +1738,11 @@ export interface IMagickImage extends IDisposable {
1706
1738
  opaque(target: IMagickColor, fill: IMagickColor): void;
1707
1739
  ping(fileName: string, settings?: MagickReadSettings): void;
1708
1740
  ping(array: ByteArray, settings?: MagickReadSettings): void;
1741
+ quantize(settings: QuantizeSettings): void;
1709
1742
  read(color: IMagickColor, width: number, height: number): void;
1710
1743
  read(fileName: string, settings?: MagickReadSettings): void;
1711
1744
  read(array: ByteArray, settings?: MagickReadSettings): void;
1712
- readFromCanvas(canvas: HTMLCanvasElement): void;
1745
+ readFromCanvas(canvas: HTMLCanvasElement, settings?: CanvasRenderingContext2DSettings): void;
1713
1746
  removeArtifact(name: string): void;
1714
1747
  removeAttribute(name: string): void;
1715
1748
  removeProfile(profile: IImageProfile): void;
@@ -1829,12 +1862,12 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
1829
1862
  set label(value: string | null);
1830
1863
  get matteColor(): IMagickColor;
1831
1864
  set matteColor(value: IMagickColor);
1832
- get orientation(): OrientationType;
1833
- set orientation(value: OrientationType);
1865
+ get orientation(): OrientationType$1;
1866
+ set orientation(value: OrientationType$1);
1834
1867
  get page(): IMagickGeometry;
1835
1868
  set page(value: IMagickGeometry);
1836
- get onProgress(): ((event: ProgressEvent) => number) | undefined;
1837
- set onProgress(value: ((event: ProgressEvent) => number) | undefined);
1869
+ get onProgress(): ((event: ProgressEvent$1) => number) | undefined;
1870
+ set onProgress(value: ((event: ProgressEvent$1) => number) | undefined);
1838
1871
  get onWarning(): ((event: WarningEvent) => number) | undefined;
1839
1872
  set onWarning(value: ((event: WarningEvent) => number) | undefined);
1840
1873
  get quality(): number;
@@ -1847,7 +1880,7 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
1847
1880
  get virtualPixelMethod(): VirtualPixelMethod;
1848
1881
  set virtualPixelMethod(value: VirtualPixelMethod);
1849
1882
  get width(): number;
1850
- alpha(value: AlphaOption): void;
1883
+ alpha(value: AlphaOption$1): void;
1851
1884
  autoOrient(): void;
1852
1885
  autoThreshold(method: AutoThresholdMethod): void;
1853
1886
  blur(): void;
@@ -1967,10 +2000,11 @@ export declare class MagickImage extends NativeInstance implements IMagickImage
1967
2000
  opaque: (target: IMagickColor, fill: IMagickColor) => void;
1968
2001
  ping(fileName: string, settings?: MagickReadSettings): void;
1969
2002
  ping(array: ByteArray, settings?: MagickReadSettings): void;
2003
+ quantize(settings: QuantizeSettings): void;
1970
2004
  read(color: IMagickColor, width: number, height: number): void;
1971
2005
  read(fileName: string, settings?: MagickReadSettings): void;
1972
2006
  read(array: ByteArray, settings?: MagickReadSettings): void;
1973
- readFromCanvas(canvas: HTMLCanvasElement): void;
2007
+ readFromCanvas(canvas: HTMLCanvasElement, settings?: CanvasRenderingContext2DSettings): void;
1974
2008
  removeArtifact(name: string): void;
1975
2009
  removeAttribute(name: string): void;
1976
2010
  removeProfile(profile: IImageProfile): void;
@@ -2061,10 +2095,11 @@ export declare class ImageMagick {
2061
2095
  static readCollection<TReturnType>(fileName: string, settings: MagickReadSettings, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
2062
2096
  static readCollection<TReturnType>(fileName: string, func: (images: IMagickImageCollection) => TReturnType): TReturnType;
2063
2097
  static readCollection<TReturnType>(fileName: string, func: (images: IMagickImageCollection) => Promise<TReturnType>): Promise<TReturnType>;
2064
- static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => TReturnType): TReturnType;
2065
- static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => Promise<TReturnType>): Promise<TReturnType>;
2098
+ static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => TReturnType, settings?: CanvasRenderingContext2DSettings): TReturnType;
2099
+ static readFromCanvas<TReturnType>(canvas: HTMLCanvasElement, func: (image: IMagickImage) => Promise<TReturnType>, settings?: CanvasRenderingContext2DSettings): Promise<TReturnType>;
2100
+ private writeConfigurationFiles;
2066
2101
  }
2067
- export declare function initializeImageMagick(wasmLocationOrData: URL | ByteArray): Promise<void>;
2102
+ export declare function initializeImageMagick(wasmLocationDataOrAssembly: URL | ByteArray | WebAssembly.Module, configurationFiles?: IConfigurationFiles): Promise<void>;
2068
2103
  export declare class MagickColors {
2069
2104
  static get None(): IMagickColor;
2070
2105
  static get Transparent(): IMagickColor;
@@ -2234,4 +2269,10 @@ export declare class Quantum {
2234
2269
  static get max(): number;
2235
2270
  }
2236
2271
 
2272
+ export {
2273
+ AlphaOption$1 as AlphaOption,
2274
+ OrientationType$1 as OrientationType,
2275
+ ProgressEvent$1 as ProgressEvent,
2276
+ };
2277
+
2237
2278
  export {};