@leonsilicon/napi-magick 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +42 -2
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/binding/index.cjs +794 -0
- package/binding/index.d.cts +38 -0
- package/dist/index.cjs +13656 -0
- package/dist/index.d.cts +11247 -0
- package/dist/index.d.ts +11247 -0
- package/dist/index.js +13508 -0
- package/licenses/ImageMagick.txt +106 -0
- package/licenses/Magick.Native.txt +202 -0
- package/licenses/codecs/aom/LICENSE +27 -0
- package/licenses/codecs/aom/PATENTS +108 -0
- package/licenses/codecs/aom/third_party/fastfeat/LICENSE +30 -0
- package/licenses/codecs/aom/third_party/highway/LICENSE-BSD3 +26 -0
- package/licenses/codecs/aom/third_party/libwebm/LICENSE.TXT +30 -0
- package/licenses/codecs/aom/third_party/libwebm/PATENTS.TXT +23 -0
- package/licenses/codecs/aom/third_party/libyuv/LICENSE +29 -0
- package/licenses/codecs/aom/third_party/vector/LICENSE +19 -0
- package/licenses/codecs/aom/third_party/x86inc/LICENSE +18 -0
- package/licenses/codecs/brotli/LICENSE +19 -0
- package/licenses/codecs/bzip2/LICENSE +42 -0
- package/licenses/codecs/cairo/COPYING +33 -0
- package/licenses/codecs/cairo/COPYING-LGPL-2.1 +510 -0
- package/licenses/codecs/cairo/COPYING-MPL-1.1 +470 -0
- package/licenses/codecs/cairo/perf/COPYING +5 -0
- package/licenses/codecs/cairo/test/COPYING +26 -0
- package/licenses/codecs/cairo/util/COPYING +4 -0
- package/licenses/codecs/cairo/util/cairo-script/COPYING +17 -0
- package/licenses/codecs/cairo/util/cairo-trace/COPYING +5 -0
- package/licenses/codecs/cairo/util/cairo-trace/COPYING-GPL-3 +674 -0
- package/licenses/codecs/croco/COPYING +481 -0
- package/licenses/codecs/croco/COPYING.LIB +481 -0
- package/licenses/codecs/de265/COPYING +871 -0
- package/licenses/codecs/de265/dec265/COPYING +20 -0
- package/licenses/codecs/de265/libde265/COPYING +165 -0
- package/licenses/codecs/de265/sherlock265/COPYING +20 -0
- package/licenses/codecs/exr/LICENSE.md +11 -0
- package/licenses/codecs/exr/PATENTS +247 -0
- package/licenses/codecs/exr/external/deflate/COPYING +22 -0
- package/licenses/codecs/exr/website/license.rst +33 -0
- package/licenses/codecs/ffi/LICENSE +21 -0
- package/licenses/codecs/ffi/LICENSE-BUILDTOOLS +353 -0
- package/licenses/codecs/fftw/COPYING +340 -0
- package/licenses/codecs/fftw/COPYRIGHT +19 -0
- package/licenses/codecs/fftw/doc/html/License-and-Copyright.html +122 -0
- package/licenses/codecs/fftw/doc/license.texi +38 -0
- package/licenses/codecs/flif/LICENSE +9 -0
- package/licenses/codecs/flif/LICENSE_Apache2 +202 -0
- package/licenses/codecs/flif/LICENSE_GPL +675 -0
- package/licenses/codecs/flif/LICENSE_LGPL +165 -0
- package/licenses/codecs/fontconfig/COPYING +200 -0
- package/licenses/codecs/freetype/LICENSE.TXT +47 -0
- package/licenses/codecs/fribidi/COPYING +501 -0
- package/licenses/codecs/gdk-pixbuf/COPYING +502 -0
- package/licenses/codecs/glib/COPYING +502 -0
- package/licenses/codecs/glib/docs/reference/COPYING +30 -0
- package/licenses/codecs/glib/glib/pcre/COPYING +5 -0
- package/licenses/codecs/glib/gmodule/COPYING +502 -0
- package/licenses/codecs/harfbuzz/COPYING +42 -0
- package/licenses/codecs/harfbuzz/perf/texts/COPYING +31 -0
- package/licenses/codecs/harfbuzz/src/ms-use/COPYING +21 -0
- package/licenses/codecs/harfbuzz/test/COPYING +95 -0
- package/licenses/codecs/heif/COPYING +871 -0
- package/licenses/codecs/heif/examples/COPYING +20 -0
- package/licenses/codecs/highway/LICENSE +371 -0
- package/licenses/codecs/highway/debian/copyright +20 -0
- package/licenses/codecs/imath/LICENSE.md +11 -0
- package/licenses/codecs/imath/website/license.rst +33 -0
- package/licenses/codecs/jbig/COPYING +339 -0
- package/licenses/codecs/jpeg-turbo/LICENSE.md +144 -0
- package/licenses/codecs/jpeg-turbo/release/License.rtf +20 -0
- package/licenses/codecs/jpeg-turbo/src/spng/LICENSE +25 -0
- package/licenses/codecs/jpeg-turbo/testimages/LICENSE.txt +45 -0
- package/licenses/codecs/jpeg-turbo-12/LICENSE.md +144 -0
- package/licenses/codecs/jpeg-turbo-12/release/License.rtf +20 -0
- package/licenses/codecs/jpeg-turbo-12/src/spng/LICENSE +25 -0
- package/licenses/codecs/jpeg-turbo-12/testimages/LICENSE.txt +45 -0
- package/licenses/codecs/jpeg-turbo-16/LICENSE.md +144 -0
- package/licenses/codecs/jpeg-turbo-16/release/License.rtf +20 -0
- package/licenses/codecs/jpeg-turbo-16/src/spng/LICENSE +25 -0
- package/licenses/codecs/jpeg-turbo-16/testimages/LICENSE.txt +45 -0
- package/licenses/codecs/jpeg-xl/LICENSE +27 -0
- package/licenses/codecs/jpeg-xl/PATENTS +22 -0
- package/licenses/codecs/jpeg-xl/debian/copyright +199 -0
- package/licenses/codecs/jpeg-xl/lib/extras/LICENSE.apngdis +27 -0
- package/licenses/codecs/lcms/LICENSE +22 -0
- package/licenses/codecs/lcms/plugins/fast_float/COPYING.GPL3 +674 -0
- package/licenses/codecs/lcms/plugins/threaded/COPYING.GPL3 +674 -0
- package/licenses/codecs/lcms/utils/jpgicc/LICENSE_iccjpeg +67 -0
- package/licenses/codecs/lqr/COPYING +674 -0
- package/licenses/codecs/lqr/COPYING.LESSER +165 -0
- package/licenses/codecs/lzma/COPYING +70 -0
- package/licenses/codecs/lzma/COPYING.0BSD +11 -0
- package/licenses/codecs/lzma/COPYING.GPLv2 +338 -0
- package/licenses/codecs/lzma/COPYING.GPLv3 +674 -0
- package/licenses/codecs/lzma/COPYING.LGPLv2.1 +501 -0
- package/licenses/codecs/lzma/build-aux/license-check.sh +177 -0
- package/licenses/codecs/openh264/LICENSE +23 -0
- package/licenses/codecs/openjpeg/LICENSE +39 -0
- package/licenses/codecs/openjpeg/thirdparty/astyle/LICENSE.md +21 -0
- package/licenses/codecs/openjpeg/thirdparty/liblcms2/COPYING +8 -0
- package/licenses/codecs/openjpeg/thirdparty/libpng/LICENSE +134 -0
- package/licenses/codecs/openjph/LICENSE +27 -0
- package/licenses/codecs/pango/COPYING +482 -0
- package/licenses/codecs/pixman/COPYING +42 -0
- package/licenses/codecs/png/LICENSE +134 -0
- package/licenses/codecs/png/ci/LICENSE_MIT.txt +19 -0
- package/licenses/codecs/png/contrib/gregbook/COPYING +340 -0
- package/licenses/codecs/png/contrib/gregbook/LICENSE +50 -0
- package/licenses/codecs/png/contrib/pngexif/LICENSE_MIT.txt +19 -0
- package/licenses/codecs/png/contrib/pngminus/LICENSE.txt +21 -0
- package/licenses/codecs/raqm/COPYING +22 -0
- package/licenses/codecs/raw/COPYRIGHT +27 -0
- package/licenses/codecs/raw/LICENSE.CDDL +340 -0
- package/licenses/codecs/raw/LICENSE.LGPL +458 -0
- package/licenses/codecs/rsvg/COPYING +340 -0
- package/licenses/codecs/rsvg/COPYING.LIB +482 -0
- package/licenses/codecs/rsvg/doc/html/licence.html +83 -0
- package/licenses/codecs/tiff/LICENSE.md +50 -0
- package/licenses/codecs/tiff/doc/project/license.rst +24 -0
- package/licenses/codecs/webp/COPYING +30 -0
- package/licenses/codecs/webp/PATENTS +23 -0
- package/licenses/codecs/xml/Copyright +24 -0
- package/licenses/codecs/xml/result/html-tokenizer/NOTICE +27 -0
- package/licenses/codecs/xml/test/html-tokenizer/NOTICE +27 -0
- package/licenses/codecs/zip/LICENSE +31 -0
- package/licenses/codecs/zlib/LICENSE +22 -0
- package/licenses/codecs/zlib/contrib/dotzlib/LICENSE_1_0.txt +23 -0
- package/licenses/codecs/zlib/contrib/minizip/LICENSE.Info-Zip +58 -0
- package/licenses/codecs/zstd/COPYING +339 -0
- package/licenses/codecs/zstd/LICENSE +30 -0
- package/licenses/codecs/zstd/build/LICENSE +0 -0
- package/licenses/magick-wasm.txt +202 -0
- package/licenses/magick_rust.txt +202 -0
- package/licenses/proxy-libintl.txt +482 -0
- package/licenses/rust/aho-corasick/COPYING +3 -0
- package/licenses/rust/aho-corasick/LICENSE-MIT +21 -0
- package/licenses/rust/bindgen/LICENSE +29 -0
- package/licenses/rust/bitflags/LICENSE-APACHE +201 -0
- package/licenses/rust/bitflags/LICENSE-MIT +25 -0
- package/licenses/rust/cc/LICENSE-APACHE +201 -0
- package/licenses/rust/cc/LICENSE-MIT +25 -0
- package/licenses/rust/cexpr/LICENSE-APACHE +201 -0
- package/licenses/rust/cexpr/LICENSE-MIT +25 -0
- package/licenses/rust/cfg-if/LICENSE-APACHE +201 -0
- package/licenses/rust/cfg-if/LICENSE-MIT +25 -0
- package/licenses/rust/clang-sys/LICENSE.txt +202 -0
- package/licenses/rust/convert_case/LICENSE +21 -0
- package/licenses/rust/ctor/LICENSE-APACHE +201 -0
- package/licenses/rust/ctor/LICENSE-MIT +5 -0
- package/licenses/rust/either/LICENSE-APACHE +201 -0
- package/licenses/rust/either/LICENSE-MIT +25 -0
- package/licenses/rust/find-msvc-tools/LICENSE-APACHE +201 -0
- package/licenses/rust/find-msvc-tools/LICENSE-MIT +25 -0
- package/licenses/rust/futures/LICENSE-APACHE +202 -0
- package/licenses/rust/futures/LICENSE-MIT +26 -0
- package/licenses/rust/futures-channel/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-channel/LICENSE-MIT +26 -0
- package/licenses/rust/futures-core/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-core/LICENSE-MIT +26 -0
- package/licenses/rust/futures-executor/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-executor/LICENSE-MIT +26 -0
- package/licenses/rust/futures-io/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-io/LICENSE-MIT +26 -0
- package/licenses/rust/futures-macro/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-macro/LICENSE-MIT +26 -0
- package/licenses/rust/futures-sink/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-sink/LICENSE-MIT +26 -0
- package/licenses/rust/futures-task/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-task/LICENSE-MIT +26 -0
- package/licenses/rust/futures-util/LICENSE-APACHE +202 -0
- package/licenses/rust/futures-util/LICENSE-MIT +26 -0
- package/licenses/rust/glob/LICENSE-APACHE +201 -0
- package/licenses/rust/glob/LICENSE-MIT +25 -0
- package/licenses/rust/itertools/LICENSE-APACHE +201 -0
- package/licenses/rust/itertools/LICENSE-MIT +25 -0
- package/licenses/rust/itoa/LICENSE-APACHE +176 -0
- package/licenses/rust/itoa/LICENSE-MIT +23 -0
- package/licenses/rust/libc/LICENSE-APACHE +176 -0
- package/licenses/rust/libc/LICENSE-MIT +25 -0
- package/licenses/rust/libloading/LICENSE +12 -0
- package/licenses/rust/log/LICENSE-APACHE +201 -0
- package/licenses/rust/log/LICENSE-MIT +25 -0
- package/licenses/rust/magick_rust/LICENSE +202 -0
- package/licenses/rust/memchr/COPYING +3 -0
- package/licenses/rust/memchr/LICENSE-MIT +21 -0
- package/licenses/rust/minimal-lexical/LICENSE-APACHE +201 -0
- package/licenses/rust/minimal-lexical/LICENSE-MIT +23 -0
- package/licenses/rust/minimal-lexical/LICENSE.md +37 -0
- package/licenses/rust/nohash-hasher/LICENSE-APACHE +202 -0
- package/licenses/rust/nohash-hasher/LICENSE-MIT +18 -0
- package/licenses/rust/nom/LICENSE +20 -0
- package/licenses/rust/pin-project-lite/LICENSE-APACHE +177 -0
- package/licenses/rust/pin-project-lite/LICENSE-MIT +23 -0
- package/licenses/rust/pkg-config/LICENSE-APACHE +201 -0
- package/licenses/rust/pkg-config/LICENSE-MIT +25 -0
- package/licenses/rust/prettyplease/LICENSE-APACHE +176 -0
- package/licenses/rust/prettyplease/LICENSE-MIT +23 -0
- package/licenses/rust/proc-macro2/LICENSE-APACHE +176 -0
- package/licenses/rust/proc-macro2/LICENSE-MIT +23 -0
- package/licenses/rust/quote/LICENSE-APACHE +176 -0
- package/licenses/rust/quote/LICENSE-MIT +23 -0
- package/licenses/rust/regex/LICENSE-APACHE +201 -0
- package/licenses/rust/regex/LICENSE-MIT +25 -0
- package/licenses/rust/regex-automata/LICENSE-APACHE +201 -0
- package/licenses/rust/regex-automata/LICENSE-MIT +25 -0
- package/licenses/rust/regex-syntax/LICENSE-APACHE +201 -0
- package/licenses/rust/regex-syntax/LICENSE-MIT +25 -0
- package/licenses/rust/rustc-hash/LICENSE-APACHE +176 -0
- package/licenses/rust/rustc-hash/LICENSE-MIT +23 -0
- package/licenses/rust/semver/LICENSE-APACHE +176 -0
- package/licenses/rust/semver/LICENSE-MIT +23 -0
- package/licenses/rust/serde/LICENSE-APACHE +176 -0
- package/licenses/rust/serde/LICENSE-MIT +23 -0
- package/licenses/rust/serde_core/LICENSE-APACHE +176 -0
- package/licenses/rust/serde_core/LICENSE-MIT +23 -0
- package/licenses/rust/serde_derive/LICENSE-APACHE +176 -0
- package/licenses/rust/serde_derive/LICENSE-MIT +23 -0
- package/licenses/rust/serde_json/LICENSE-APACHE +176 -0
- package/licenses/rust/serde_json/LICENSE-MIT +23 -0
- package/licenses/rust/shlex/LICENSE-APACHE +13 -0
- package/licenses/rust/shlex/LICENSE-MIT +21 -0
- package/licenses/rust/slab/LICENSE +25 -0
- package/licenses/rust/syn/LICENSE-APACHE +176 -0
- package/licenses/rust/syn/LICENSE-MIT +23 -0
- package/licenses/rust/unicode-ident/LICENSE-APACHE +176 -0
- package/licenses/rust/unicode-ident/LICENSE-MIT +23 -0
- package/licenses/rust/unicode-ident/LICENSE-UNICODE +39 -0
- package/licenses/rust/unicode-segmentation/LICENSE-APACHE +201 -0
- package/licenses/rust/unicode-segmentation/LICENSE-MIT +25 -0
- package/licenses/rust/windows-link/license-apache-2.0 +201 -0
- package/licenses/rust/windows-link/license-mit +21 -0
- package/licenses/rust/zmij/LICENSE-MIT +23 -0
- package/package.json +99 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @leonsilicon/napi-magick
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Native ImageMagick for Node.js with the **magick-wasm 0.0.44 API**, backed by **napi-rs and magick_rust 2.1.1**. ImageMagick and its codec libraries are included in platform packages; consumers need no compiler, system ImageMagick installation, or WASM download.
|
|
4
|
+
|
|
5
|
+
Requires Node.js 22 or newer. The build matrix produces macOS 15+ arm64, Linux glibc arm64/x64, and Windows x64 packages. The native API uses Q8 without HDRI, matching the pinned upstream WASM build.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { ImageMagick, MagickFormat, initializeImageMagick } from "@leonsilicon/napi-magick";
|
|
9
|
+
|
|
10
|
+
await initializeImageMagick();
|
|
11
|
+
ImageMagick.read(inputBytes, (image) => {
|
|
12
|
+
image.resize(320, 240);
|
|
13
|
+
image.write(MagickFormat.Png, (bytes) => {
|
|
14
|
+
// bytes is a Uint8Array. Copy it with bytes.slice() to retain independent data.
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The classes, enums, overloads, callbacks, errors, and asynchronous disposal behavior come from the pinned magick-wasm facade. Existing initialization arguments are accepted for migration; a WASM binary is unnecessary. Native ImageMagick settings are shared within a Node.js process. Pixel buffers are snapshots that remain valid after image mutation or disposal; use `setPixel` / `setArea` to write pixels. Encoded output views retain their native allocation until garbage collection. External buffers cannot be transferred to another worker; copy them first.
|
|
20
|
+
|
|
21
|
+
## Upstream compatibility
|
|
22
|
+
|
|
23
|
+
All **770 upstream tests** are retained. Source and fixture hashes are verified before generation, and the complete reviewed patch is checked in at `patches.gen/magick-wasm.patch`. No tests are skipped. CI runs the full suite against both the source facade and a clean npm installation on Node.js 24 and 22, including upstream CommonJS and ESM distribution checks. Seven additional tests cover native bounds, ownership, asynchronous output, and worker isolation.
|
|
24
|
+
|
|
25
|
+
Five assertions have approved native portability patches: AVIF/JPEG XL encoding validates bounded output size, decoded dimensions/format, and RMS distortion below 0.03; quantization allows RMS drift below 0.00005; remapping allows at most eight pixels of count drift while preserving the palette and total count; polynomial uses a defined zero exponent for its final constant, correcting an upstream out-of-bounds read. The rest of the upstream behavior assertions are retained. The facade also corrects upstream's OffsetInfo use of PrimaryInfo setters.
|
|
26
|
+
|
|
27
|
+
ImageMagick 7.1.2-32 and the upstream static codec SDK are pinned and verified. Build patches preserve WASM exception tags, seeded random behavior, and resource defaults. Full licenses, the codec SBOM, source revisions, and relinking instructions accompany the platform artifacts; see `THIRD_PARTY_NOTICES.md`.
|
|
28
|
+
|
|
29
|
+
## Development
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
vp install
|
|
33
|
+
vp run build:deps
|
|
34
|
+
vp run build
|
|
35
|
+
vp check
|
|
36
|
+
vp test
|
|
37
|
+
vp run test:upstream
|
|
38
|
+
vp run check:rust
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
POSIX builds require Clang C/C++ compilers, make, autoconf, automake, libtool, and pkg-config. Windows builds require Visual Studio 2026 C++ tools and LLVM/libclang. All codecs are downloaded as checksum-verified build SDKs. `vp run patch:upstream` regenerates reviewed patches; `vp run verify:upstream` checks upstream hashes and patch drift. Vite+ bundles the facade and publishing helper; helper packages are development dependencies only.
|
|
42
|
+
|
|
43
|
+
GitHub Actions assembles and tests all four platform packages. Version tags matching `package.json` use the `npm` environment and OIDC publishing. An initial npm publication and registry-side trusted publisher registration are needed before the first automated release.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
This package includes the Apache-2.0 magick-wasm facade and Magick.Native compatibility shim, magick_rust, and ImageMagick with its codec libraries. Original copyright notices remain in the vendored source. Full license texts are in `licenses/`, and each platform package includes its upstream codec SBOM and exact source revisions.
|
|
2
|
+
|
|
3
|
+
The pinned ImageMagick/Dependencies SDK is release 2026.09.26.1516; archive SHA-256 digests are enforced by `scripts/build-deps.mjs`. The upstream dependency source revisions are recorded in `vendor/dependency-sources.json`. Their complete corresponding source is available at `https://github.com/ImageMagick/<name>/tree/<revision>` for every entry. Optional codec source licenses are included conservatively even when that codec is disabled in this build. LibRaw is available under LGPL-2.1 or CDDL-1.0; both license texts are provided.
|
|
4
|
+
|
|
5
|
+
To rebuild or relink the addon with modified codec libraries, replace the libraries in `.native/dependencies/lib` and run `vp run build:deps -- --force`, then `vp run build:native`. The GitHub build artifacts include the static engine and compatibility libraries, Rust build intermediates, and these instructions for relinking. No build tools are required to install or use the npm packages.
|
|
6
|
+
|
|
7
|
+
The SDK uses the MIT proxy-libintl implementation, pinned by GLib to tag 0.1 (commit e792f40de9b2d5c660003276c022ba8d3038fe62), whose license is included. Rust dependency license texts are included conservatively in `licenses/rust/`; exact crate revisions and checksums are in Cargo.lock.
|
|
8
|
+
|
|
9
|
+
magick_rust 2.1.1 is vendored with a one-line Windows import fix recorded in `patches.gen/magick-rust.patch`. Its original crate checksum and the complete vendored source hashes are recorded in `vendor/upstream.json`.
|