@ai-ecoverse/wasm-libjpeg-turbo 3.1.2 → 3.2.0-1

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 CHANGED
@@ -1,191 +1,412 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to the Licensor for inclusion in the Work by the copyright
52
- owner or by an individual or Legal Entity authorized to submit on
53
- behalf of the copyright owner. For the purposes of this definition,
54
- "submitted" means any form of electronic, verbal, or written
55
- communication sent to the Licensor or its representatives, including
56
- but not limited to communication on electronic mailing lists, source
57
- code control systems, and issue tracking systems that are managed by,
58
- or on behalf of, the Licensor for the purpose of discussing and
59
- improving the Work, but excluding communication that is conspicuously
60
- marked or otherwise designated in writing by the copyright owner as
61
- "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
- Copyright 2026 ai-ecoverse
180
-
181
- Licensed under the Apache License, Version 2.0 (the "License");
182
- you may not use this file except in compliance with the License.
183
- You may obtain a copy of the License at
184
-
185
- http://www.apache.org/licenses/LICENSE-2.0
186
-
187
- Unless required by applicable law or agreed to in writing, software
188
- distributed under the License is distributed on an "AS IS" BASIS,
189
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
- See the License for the specific language governing permissions and
191
- limitations under the License.
1
+ ==> LICENSE.md <==
2
+
3
+ libjpeg-turbo Licenses
4
+ ======================
5
+
6
+ libjpeg-turbo is covered by two compatible BSD-style open source licenses:
7
+
8
+ - The IJG (Independent JPEG Group) License, which is listed in
9
+ [README.ijg](README.ijg)
10
+
11
+ This license applies to the libjpeg API library and associated programs,
12
+ including any code inherited from libjpeg and any modifications to that
13
+ code.
14
+
15
+ - The Modified (3-clause) BSD License, which is listed below
16
+
17
+ This license applies to the TurboJPEG API library and associated programs,
18
+ [libspng](https://libspng.org) (which is used by cjpeg and djpeg), and the
19
+ build/test system.
20
+
21
+ * The TurboJPEG API library wraps the libjpeg API library, so in the context
22
+ of the overall TurboJPEG API library, both the terms of the IJG License and
23
+ the terms of the Modified (3-clause) BSD License apply.
24
+ * cjpeg and djpeg use libspng, so in the context of those programs, both the
25
+ terms of the IJG License and the terms of the Modified (3-clause) BSD
26
+ License apply.
27
+
28
+
29
+ Component Licenses
30
+ ==================
31
+
32
+ Some of libjpeg-turbo's modules and internal dependencies are covered by less
33
+ restrictive licenses, but in the context of libjpeg-turbo as a whole, the terms
34
+ of the less restrictive licenses are subsumed by either the IJG License or the
35
+ Modified BSD License. (In other words, the terms of the less restrictive
36
+ licenses are satisfied if the terms of the IJG and Modified BSD Licenses are
37
+ satisfied.)
38
+
39
+ - The libjpeg-turbo SIMD source code and zlib are covered by the
40
+ [zlib License](https://spdx.org/licenses/Zlib.html), which is subsumed by the
41
+ IJG License in the context of the cjpeg and djpeg programs and the libjpeg
42
+ API library.
43
+
44
+ - Some of the libspng source code is covered by the
45
+ [PNG Reference Library License v2](https://spdx.org/licenses/libpng-2.0.html),
46
+ which is subsumed by the IJG License in the context of the cjpeg and djpeg
47
+ programs and the TurboJPEG API library.
48
+
49
+ - Most of the libspng source code is covered by the
50
+ [Simplified (2-clause) BSD License](https://spdx.org/licenses/BSD-2-Clause.html),
51
+ which is subsumed by the Modified BSD License in the context of the cjpeg and
52
+ djpeg programs and the TurboJPEG API library.
53
+
54
+
55
+ Complying with the libjpeg-turbo Licenses
56
+ =========================================
57
+
58
+ This section provides a roll-up of the libjpeg-turbo licensing terms, to the
59
+ best of our understanding. This is not a license in and of itself. It is
60
+ intended solely for clarification.
61
+
62
+ 1. If you are distributing a modified version of the libjpeg-turbo source,
63
+ then:
64
+
65
+ 1. You cannot alter or remove any existing copyright or license notices
66
+ from the source.
67
+
68
+ **Origin**
69
+ - Clause 1 of the IJG License
70
+ - Clause 1 of the Modified BSD License
71
+
72
+ 2. You must add your own copyright notice to the header of each source
73
+ file you modified, so others can tell that you modified that file. (If
74
+ there is not an existing copyright header in that file, then you can
75
+ simply add a notice stating that you modified the file.)
76
+
77
+ **Origin**
78
+ - Clause 1 of the IJG License
79
+
80
+ 3. You must include the IJG README file, and you must not alter any of the
81
+ copyright or license text in that file.
82
+
83
+ **Origin**
84
+ - Clause 1 of the IJG License
85
+
86
+ 2. If you are distributing only libjpeg-turbo binaries without the source, or
87
+ if you are distributing an application that statically links with
88
+ libjpeg-turbo, then:
89
+
90
+ 1. Your product documentation must include a message stating:
91
+
92
+ This software is based in part on the work of the Independent JPEG
93
+ Group.
94
+
95
+ **Origin**
96
+ - Clause 2 of the IJG license
97
+
98
+ 2. If your binary distribution includes or uses the TurboJPEG API or
99
+ associated programs, cjpeg, or djpeg, then your product documentation
100
+ must include the text of the Modified BSD License (see below.)
101
+
102
+ **Origin**
103
+ - Clause 2 of the Modified BSD License
104
+
105
+ 3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
106
+ contributors thereof in advertising, publicity, etc.
107
+
108
+ **Origin**
109
+ - IJG License
110
+ - Clause 3 of the Modified BSD License
111
+
112
+ 4. The authors and distributors do not warrant libjpeg-turbo to be free of
113
+ defects, nor do we accept any liability for undesirable consequences
114
+ resulting from your use of the software.
115
+
116
+ **Origin**
117
+ - IJG License
118
+ - Modified BSD License
119
+
120
+
121
+ The Modified (3-clause) BSD License
122
+ ===================================
123
+
124
+ Copyright (C) 2009-2026 D. R. Commander<br>
125
+ Copyright (C) 2018-2023 Randy <randy408@protonmail.com>
126
+
127
+ Redistribution and use in source and binary forms, with or without
128
+ modification, are permitted provided that the following conditions are met:
129
+
130
+ - Redistributions of source code must retain the above copyright notice,
131
+ this list of conditions and the following disclaimer.
132
+ - Redistributions in binary form must reproduce the above copyright notice,
133
+ this list of conditions and the following disclaimer in the documentation
134
+ and/or other materials provided with the distribution.
135
+ - Neither the name of the libjpeg-turbo Project nor the names of its
136
+ contributors may be used to endorse or promote products derived from this
137
+ software without specific prior written permission.
138
+
139
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
140
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
141
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
142
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
143
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
144
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
145
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
146
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
147
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
148
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
149
+ POSSIBILITY OF SUCH DAMAGE.
150
+
151
+ ==> README.ijg <==
152
+
153
+ libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
154
+ to include only information relevant to libjpeg-turbo, to wordsmith certain
155
+ sections, and to remove impolitic language that existed in the libjpeg v8
156
+ README. It is included only for reference. Please see README.md for
157
+ information specific to libjpeg-turbo.
158
+
159
+
160
+ The Independent JPEG Group's JPEG software
161
+ ==========================================
162
+
163
+ This distribution contains a release of the Independent JPEG Group's free JPEG
164
+ software. You are welcome to redistribute this software and to use it for any
165
+ purpose, subject to the conditions under LEGAL ISSUES, below.
166
+
167
+ This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone,
168
+ Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson,
169
+ Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge' Weijers,
170
+ and other members of the Independent JPEG Group.
171
+
172
+ IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee
173
+ (also known as JPEG, together with ITU-T SG16).
174
+
175
+
176
+ DOCUMENTATION ROADMAP
177
+ =====================
178
+
179
+ This file contains the following sections:
180
+
181
+ OVERVIEW General description of JPEG and the IJG software.
182
+ LEGAL ISSUES Copyright, lack of warranty, terms of distribution.
183
+ REFERENCES Where to learn more about JPEG.
184
+ ARCHIVE LOCATIONS Where to find newer versions of this software.
185
+ FILE FORMAT WARS Software *not* to get.
186
+ TO DO Plans for future IJG releases.
187
+
188
+ Other documentation files in the distribution are:
189
+
190
+ User documentation:
191
+ doc/usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
192
+ rdjpgcom, and wrjpgcom.
193
+ doc/*.1 Unix-style man pages for programs (same info as
194
+ usage.txt).
195
+ doc/wizard.txt Advanced usage instructions for JPEG wizards only.
196
+ doc/change.log Version-to-version change highlights.
197
+ Programmer and internal documentation:
198
+ doc/libjpeg.txt How to use the JPEG library in your own programs.
199
+ src/example.c Sample code for calling the JPEG library.
200
+ doc/structure.txt Overview of the JPEG library's internal structure.
201
+ doc/coderules.txt Coding style rules --- please read if you contribute
202
+ code.
203
+
204
+ Please read at least usage.txt. Some information can also be found in the JPEG
205
+ FAQ (Frequently Asked Questions) article. See ARCHIVE LOCATIONS below to find
206
+ out where to obtain the FAQ article.
207
+
208
+ If you want to understand how the JPEG code works, we suggest reading one or
209
+ more of the REFERENCES, then looking at the documentation files (in roughly
210
+ the order listed) before diving into the code.
211
+
212
+
213
+ OVERVIEW
214
+ ========
215
+
216
+ This package contains C software to implement JPEG image encoding, decoding,
217
+ and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
218
+ method for full-color and grayscale images. JPEG's strong suit is compressing
219
+ photographic images or other types of images that have smooth color and
220
+ brightness transitions between neighboring pixels. Images with sharp lines or
221
+ other abrupt features may not compress well with JPEG, and a higher JPEG
222
+ quality may have to be used to avoid visible compression artifacts with such
223
+ images.
224
+
225
+ JPEG is normally lossy, meaning that the output pixels are not necessarily
226
+ identical to the input pixels. However, on photographic content and other
227
+ "smooth" images, very good compression ratios can be obtained with no visible
228
+ compression artifacts, and extremely high compression ratios are possible if
229
+ you are willing to sacrifice image quality (by reducing the "quality" setting
230
+ in the compressor.)
231
+
232
+ This software implements JPEG baseline, extended-sequential, progressive, and
233
+ lossless compression processes. Provision is made for supporting all variants
234
+ of these processes, although some uncommon parameter settings aren't
235
+ implemented yet. We have made no provision for supporting the hierarchical
236
+ processes defined in the standard.
237
+
238
+ We provide a set of library routines for reading and writing JPEG image files,
239
+ plus two sample applications "cjpeg" and "djpeg", which use the library to
240
+ perform conversion between JPEG and some other popular image file formats.
241
+ The library is intended to be reused in other applications.
242
+
243
+ In order to support file conversion and viewing software, we have included
244
+ considerable functionality beyond the bare JPEG coding/decoding capability;
245
+ for example, the color quantization modules are not strictly part of JPEG
246
+ decoding, but they are essential for output to colormapped file formats. These
247
+ extra functions can be compiled out of the library if not required for a
248
+ particular application.
249
+
250
+ We have also included "jpegtran", a utility for lossless transcoding between
251
+ different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple
252
+ applications for inserting and extracting textual comments in JFIF files.
253
+
254
+ The emphasis in designing this software has been on achieving portability and
255
+ flexibility, while also making it fast enough to be useful. In particular,
256
+ the software is not intended to be read as a tutorial on JPEG. (See the
257
+ REFERENCES section for introductory material.) Rather, it is intended to
258
+ be reliable, portable, industrial-strength code. We do not claim to have
259
+ achieved that goal in every aspect of the software, but we strive for it.
260
+
261
+ We welcome the use of this software as a component of commercial products.
262
+ No royalty is required, but we do ask for an acknowledgement in product
263
+ documentation, as described under LEGAL ISSUES.
264
+
265
+
266
+ LEGAL ISSUES
267
+ ============
268
+
269
+ In plain English:
270
+
271
+ 1. We don't promise that this software works. (But if you find any bugs,
272
+ please let us know!)
273
+ 2. You can use this software for whatever you want. You don't have to pay us.
274
+ 3. You may not pretend that you wrote this software. If you use it in a
275
+ program, you must acknowledge somewhere in your documentation that
276
+ you've used the IJG code.
277
+
278
+ In legalese:
279
+
280
+ The authors make NO WARRANTY or representation, either express or implied,
281
+ with respect to this software, its quality, accuracy, merchantability, or
282
+ fitness for a particular purpose. This software is provided "AS IS", and you,
283
+ its user, assume the entire risk as to its quality and accuracy.
284
+
285
+ This software is copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
286
+ All Rights Reserved except as specified below.
287
+
288
+ Permission is hereby granted to use, copy, modify, and distribute this
289
+ software (or portions thereof) for any purpose, without fee, subject to these
290
+ conditions:
291
+ (1) If any part of the source code for this software is distributed, then this
292
+ README file must be included, with this copyright and no-warranty notice
293
+ unaltered; and any additions, deletions, or changes to the original files
294
+ must be clearly indicated in accompanying documentation.
295
+ (2) If only executable code is distributed, then the accompanying
296
+ documentation must state that "this software is based in part on the work of
297
+ the Independent JPEG Group".
298
+ (3) Permission for use of this software is granted only if the user accepts
299
+ full responsibility for any undesirable consequences; the authors accept
300
+ NO LIABILITY for damages of any kind.
301
+
302
+ These conditions apply to any software derived from or based on the IJG code,
303
+ not just to the unmodified library. If you use our work, you ought to
304
+ acknowledge us.
305
+
306
+ Permission is NOT granted for the use of any IJG author's name or company name
307
+ in advertising or publicity relating to this software or products derived from
308
+ it. This software may be referred to only as "the Independent JPEG Group's
309
+ software".
310
+
311
+ We specifically permit and encourage the use of this software as the basis of
312
+ commercial products, provided that all warranty or liability claims are
313
+ assumed by the product vendor.
314
+
315
+
316
+ REFERENCES
317
+ ==========
318
+
319
+ We recommend reading one or more of these references before trying to
320
+ understand the innards of the JPEG software.
321
+
322
+ The best short technical introduction to the JPEG compression algorithm is
323
+ Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
324
+ Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
325
+ (Adjacent articles in that issue discuss MPEG motion picture compression,
326
+ applications of JPEG, and related topics.) If you don't have the CACM issue
327
+ handy, a PDF file containing a revised version of Wallace's article is
328
+ available at http://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually
329
+ a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
330
+ omits the sample images that appeared in CACM, but it includes corrections
331
+ and some added material. Note: the Wallace article is copyright ACM and IEEE,
332
+ and it may not be used for commercial purposes.
333
+
334
+ A somewhat less technical, more leisurely introduction to JPEG can be found in
335
+ "The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by
336
+ M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides
337
+ good explanations and example C code for a multitude of compression methods
338
+ including JPEG. It is an excellent source if you are comfortable reading C
339
+ code but don't know much about data compression in general. The book's JPEG
340
+ sample code is far from industrial-strength, but when you are ready to look
341
+ at a full implementation, you've got one here...
342
+
343
+ The best currently available description of JPEG is the textbook "JPEG Still
344
+ Image Data Compression Standard" by William B. Pennebaker and Joan L.
345
+ Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1.
346
+ Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG
347
+ standards (DIS 10918-1 and draft DIS 10918-2).
348
+
349
+ The original JPEG standard is divided into two parts, Part 1 being the actual
350
+ specification, while Part 2 covers compliance testing methods. Part 1 is
351
+ titled "Digital Compression and Coding of Continuous-tone Still Images,
352
+ Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS
353
+ 10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of
354
+ Continuous-tone Still Images, Part 2: Compliance testing" and has document
355
+ numbers ISO/IEC IS 10918-2, ITU-T T.83.
356
+
357
+ The JPEG standard does not specify all details of an interchangeable file
358
+ format. For the omitted details, we follow the "JFIF" conventions, revision
359
+ 1.02. JFIF version 1 has been adopted as ISO/IEC 10918-5 (05/2013) and
360
+ Recommendation ITU-T T.871 (05/2011): Information technology - Digital
361
+ compression and coding of continuous-tone still images: JPEG File Interchange
362
+ Format (JFIF). It is available as a free download in PDF file format from
363
+ https://www.iso.org/standard/54989.html and http://www.itu.int/rec/T-REC-T.871.
364
+ A PDF file of the older JFIF 1.02 specification is available at
365
+ http://www.w3.org/Graphics/JPEG/jfif3.pdf.
366
+
367
+ The TIFF 6.0 file format specification can be obtained from
368
+ http://mirrors.ctan.org/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation
369
+ scheme found in the TIFF 6.0 spec of 3-June-92 has a number of serious
370
+ problems. IJG does not recommend use of the TIFF 6.0 design (TIFF Compression
371
+ tag 6). Instead, we recommend the JPEG design proposed by TIFF Technical Note
372
+ #2 (Compression tag 7). Copies of this Note can be obtained from
373
+ http://www.ijg.org/files/. It is expected that the next revision
374
+ of the TIFF spec will replace the 6.0 JPEG design with the Note's design.
375
+ Although IJG's own code does not support TIFF/JPEG, the free libtiff library
376
+ uses our library to implement TIFF/JPEG per the Note.
377
+
378
+
379
+ ARCHIVE LOCATIONS
380
+ =================
381
+
382
+ The "official" archive site for this software is www.ijg.org.
383
+ The most recent released version can always be found there in
384
+ directory "files".
385
+
386
+ The JPEG FAQ (Frequently Asked Questions) article is a source of some
387
+ general information about JPEG. It is available at
388
+ http://www.faqs.org/faqs/jpeg-faq.
389
+
390
+
391
+ FILE FORMAT COMPATIBILITY
392
+ =========================
393
+
394
+ This software implements ITU T.81 | ISO/IEC 10918 with some extensions from
395
+ ITU T.871 | ISO/IEC 10918-5 (JPEG File Interchange Format-- see REFERENCES).
396
+ Informally, the term "JPEG image" or "JPEG file" most often refers to JFIF or
397
+ a subset thereof, but there are other formats containing the name "JPEG" that
398
+ are incompatible with the original JPEG standard or with JFIF (for instance,
399
+ JPEG 2000 and JPEG XR). This software therefore does not support these
400
+ formats. Indeed, one of the original reasons for developing this free software
401
+ was to help force convergence on a common, interoperable format standard for
402
+ JPEG files.
403
+
404
+ JFIF is a minimal or "low end" representation. TIFF/JPEG (TIFF revision 6.0 as
405
+ modified by TIFF Technical Note #2) can be used for "high end" applications
406
+ that need to record a lot of additional data about an image.
407
+
408
+
409
+ TO DO
410
+ =====
411
+
412
+ Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # `@ai-ecoverse/wasm-libjpeg-turbo`
2
2
 
3
- libjpeg-turbo **3.1.2** built for WebAssembly / emscripten, packaged by
3
+ libjpeg-turbo **3.2.0** built for WebAssembly / emscripten, packaged by
4
4
  [homescoop](https://github.com/ai-ecoverse/homescoop).
5
5
 
6
6
  | | |
7
7
  | --- | --- |
8
- | Upstream | [libjpeg-turbo/libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo) `3.1.2` |
8
+ | Upstream | [libjpeg-turbo/libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo) `3.2.0` |
9
9
  | Recipe | [`packages/libjpeg-turbo`](https://github.com/ai-ecoverse/homescoop/tree/main/packages/libjpeg-turbo) |
10
10
  | Build | `build.sh` (ladder `emcmake`, `-DWITH_SIMD=0`) |
11
11
 
package/include/jconfig.h CHANGED
@@ -4,10 +4,10 @@
4
4
  #define JPEG_LIB_VERSION 62
5
5
 
6
6
  /* libjpeg-turbo version */
7
- #define LIBJPEG_TURBO_VERSION 3.1.2
7
+ #define LIBJPEG_TURBO_VERSION 3.2.0
8
8
 
9
9
  /* libjpeg-turbo version in integer form */
10
- #define LIBJPEG_TURBO_VERSION_NUMBER 3001002
10
+ #define LIBJPEG_TURBO_VERSION_NUMBER 3002000
11
11
 
12
12
  /* Support arithmetic encoding when using 8-bit samples */
13
13
  #define C_ARITH_CODING_SUPPORTED 1
package/include/jerror.h CHANGED
@@ -7,7 +7,7 @@
7
7
  * Lossless JPEG Modifications:
8
8
  * Copyright (C) 1999, Ken Murchison.
9
9
  * libjpeg-turbo Modifications:
10
- * Copyright (C) 2014, 2017, 2021-2023, D. R. Commander.
10
+ * Copyright (C) 2014, 2017, 2021-2023, 2026, D. R. Commander.
11
11
  * For conditions of distribution and use, see the accompanying README.ijg
12
12
  * file.
13
13
  *
@@ -137,7 +137,7 @@ JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up")
137
137
  JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation")
138
138
  JMESSAGE(JERR_XMS_READ, "Read from XMS failed")
139
139
  JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed")
140
- JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT_SHORT)
140
+ JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT)
141
141
  JMESSAGE(JMSG_VERSION, JVERSION)
142
142
  JMESSAGE(JTRC_16BIT_TABLES,
143
143
  "Caution: quantization tables are too coarse for baseline JPEG")
@@ -272,7 +272,7 @@ JMESSAGE(JERR_BAD_RESTART,
272
272
  (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
273
273
  #define ERREXITS(cinfo, code, str) \
274
274
  ((cinfo)->err->msg_code = (code), \
275
- strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
275
+ strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX - 1), \
276
276
  (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \
277
277
  (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
278
278
 
@@ -7,7 +7,8 @@
7
7
  * Lossless JPEG Modifications:
8
8
  * Copyright (C) 1999, Ken Murchison.
9
9
  * libjpeg-turbo Modifications:
10
- * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander.
10
+ * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, 2026,
11
+ * D. R. Commander.
11
12
  * For conditions of distribution and use, see the accompanying README.ijg
12
13
  * file.
13
14
  *
@@ -241,7 +242,9 @@ typedef int boolean;
241
242
  /* Encoder capability options: */
242
243
 
243
244
  #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
244
- #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
245
+ #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires
246
+ C_MULTISCAN_FILES_SUPPORTED and
247
+ ENTROPY_OPT_SUPPORTED) */
245
248
  #define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */
246
249
  #define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
247
250
  /* Note: if you selected 12-bit data precision, it is dangerous to turn off
@@ -249,21 +252,22 @@ typedef int boolean;
249
252
  * precision, so jchuff.c normally uses entropy optimization to compute
250
253
  * usable tables for higher precision. If you don't want to do optimization,
251
254
  * you'll have to supply different default Huffman tables.
252
- * The exact same statements apply for progressive and lossless JPEG:
253
- * the default tables don't work for progressive mode or lossless mode.
254
- * (This may get fixed, however.)
255
+ * The exact same statements apply for lossless JPEG: the default tables don't
256
+ * work for lossless mode. (This may get fixed, however.)
255
257
  */
256
258
  #define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
257
259
 
258
260
  /* Decoder capability options: */
259
261
 
260
262
  #define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
261
- #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
262
- #define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */
263
+ #define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires
264
+ D_MULTISCAN_FILES_SUPPORTED) */
265
+ #define D_LOSSLESS_SUPPORTED /* Lossless JPEG? (Requires
266
+ D_MULTISCAN_FILES_SUPPORTED) */
263
267
  #define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
264
268
  #define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
265
- #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
266
- #undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
269
+ #define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? (Requires
270
+ DCT_ISLOW_SUPPORTED) */
267
271
  #define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */
268
272
  #define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */
269
273
  #define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */
package/lib/libjpeg.a CHANGED
Binary file
Binary file
@@ -5,7 +5,7 @@ includedir=${prefix}/include
5
5
 
6
6
  Name: libjpeg
7
7
  Description: libjpeg (homescoop wasm / emscripten)
8
- Version: 3.1.2
8
+ Version: 3.2.0
9
9
  Requires:
10
10
  Cflags: -I${includedir}
11
11
  Libs: -L${libdir} -ljpeg
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/wasm-libjpeg-turbo",
3
- "version": "3.1.2",
3
+ "version": "3.2.0-1",
4
4
  "description": "libjpeg-turbo JPEG codec (WASM / emscripten, SLICC homescoop ladder)",
5
- "license": "Apache-2.0",
5
+ "license": "IJG AND BSD-3-Clause AND Zlib",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/ai-ecoverse/homescoop.git",
@@ -27,6 +27,6 @@
27
27
  },
28
28
  "homescoop": {
29
29
  "recipe": "libjpeg-turbo",
30
- "upstream": "3.1.2"
30
+ "upstream": "3.2.0"
31
31
  }
32
32
  }