@img/sharp-libvips-dev-wasm32 1.2.3 → 1.2.4

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.
Files changed (54) hide show
  1. package/include/expat.h +39 -25
  2. package/include/expat_config.h +9 -9
  3. package/include/expat_external.h +62 -61
  4. package/include/jconfig.h +37 -14
  5. package/include/jerror.h +47 -42
  6. package/include/jmorecfg.h +21 -18
  7. package/include/jpeglib.h +216 -132
  8. package/include/tiff.h +1 -0
  9. package/include/tiffconf.h +1 -1
  10. package/include/tiffio.h +23 -5
  11. package/include/tiffvers.h +4 -4
  12. package/include/vips/version.h +4 -4
  13. package/lib/glib-2.0/include/glibconfig.h +1 -1
  14. package/lib/libaom.a +0 -0
  15. package/lib/libcgif.a +0 -0
  16. package/lib/libexif.a +0 -0
  17. package/lib/libexpat.a +0 -0
  18. package/lib/libexpat.la +3 -3
  19. package/lib/libffi.a +0 -0
  20. package/lib/libgio-2.0.a +0 -0
  21. package/lib/libglib-2.0.a +0 -0
  22. package/lib/libgmodule-2.0.a +0 -0
  23. package/lib/libgobject-2.0.a +0 -0
  24. package/lib/libgthread-2.0.a +0 -0
  25. package/lib/libheif.a +0 -0
  26. package/lib/libhwy.a +0 -0
  27. package/lib/libimagequant.a +0 -0
  28. package/lib/libjpeg.a +0 -0
  29. package/lib/liblcms2.a +0 -0
  30. package/lib/libresvg.a +0 -0
  31. package/lib/libsharpyuv.a +0 -0
  32. package/lib/libspng.a +0 -0
  33. package/lib/libtiff.a +0 -0
  34. package/lib/libtiff.la +2 -2
  35. package/lib/libvips-cpp.a +0 -0
  36. package/lib/libvips.a +0 -0
  37. package/lib/libwebp.a +0 -0
  38. package/lib/libwebpdemux.a +0 -0
  39. package/lib/libwebpmux.a +0 -0
  40. package/lib/libz.a +0 -0
  41. package/lib/pkgconfig/expat.pc +1 -1
  42. package/lib/pkgconfig/gio-2.0.pc +1 -1
  43. package/lib/pkgconfig/glib-2.0.pc +1 -1
  44. package/lib/pkgconfig/gmodule-2.0.pc +1 -1
  45. package/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
  46. package/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
  47. package/lib/pkgconfig/gobject-2.0.pc +1 -1
  48. package/lib/pkgconfig/gthread-2.0.pc +1 -1
  49. package/lib/pkgconfig/libjpeg.pc +1 -1
  50. package/lib/pkgconfig/libtiff-4.pc +1 -1
  51. package/lib/pkgconfig/vips-cpp.pc +1 -1
  52. package/lib/pkgconfig/vips.pc +1 -1
  53. package/package.json +1 -1
  54. package/versions.json +6 -6
package/include/expat.h CHANGED
@@ -19,6 +19,7 @@
19
19
  Copyright (c) 2023 Hanno Böck <hanno@gentoo.org>
20
20
  Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
21
21
  Copyright (c) 2024 Taichi Haradaguchi <20001722@ymail.ne.jp>
22
+ Copyright (c) 2025 Matthew Fernandez <matthew.fernandez@gmail.com>
22
23
  Licensed under the MIT license:
23
24
 
24
25
  Permission is hereby granted, free of charge, to any person obtaining
@@ -42,21 +43,21 @@
42
43
  */
43
44
 
44
45
  #ifndef Expat_INCLUDED
45
- #define Expat_INCLUDED 1
46
+ # define Expat_INCLUDED 1
46
47
 
47
- #include <stdlib.h>
48
- #include "expat_external.h"
48
+ # include <stdlib.h>
49
+ # include "expat_external.h"
49
50
 
50
- #ifdef __cplusplus
51
+ # ifdef __cplusplus
51
52
  extern "C" {
52
- #endif
53
+ # endif
53
54
 
54
55
  struct XML_ParserStruct;
55
56
  typedef struct XML_ParserStruct *XML_Parser;
56
57
 
57
58
  typedef unsigned char XML_Bool;
58
- #define XML_TRUE ((XML_Bool)1)
59
- #define XML_FALSE ((XML_Bool)0)
59
+ # define XML_TRUE ((XML_Bool)1)
60
+ # define XML_FALSE ((XML_Bool)0)
60
61
 
61
62
  /* The XML_Status enum gives the possible return values for several
62
63
  API functions. The preprocessor #defines are included so this
@@ -73,11 +74,11 @@ typedef unsigned char XML_Bool;
73
74
  */
74
75
  enum XML_Status {
75
76
  XML_STATUS_ERROR = 0,
76
- #define XML_STATUS_ERROR XML_STATUS_ERROR
77
+ # define XML_STATUS_ERROR XML_STATUS_ERROR
77
78
  XML_STATUS_OK = 1,
78
- #define XML_STATUS_OK XML_STATUS_OK
79
+ # define XML_STATUS_OK XML_STATUS_OK
79
80
  XML_STATUS_SUSPENDED = 2
80
- #define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
81
+ # define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
81
82
  };
82
83
 
83
84
  enum XML_Error {
@@ -276,7 +277,7 @@ XML_ParserCreate_MM(const XML_Char *encoding,
276
277
 
277
278
  /* Prepare a parser object to be reused. This is particularly
278
279
  valuable when memory allocation overhead is disproportionately high,
279
- such as when a large number of small documnents need to be parsed.
280
+ such as when a large number of small documents need to be parsed.
280
281
  All handlers are cleared from the parser, except for the
281
282
  unknownEncodingHandler. The parser's external state is re-initialized
282
283
  except for the values of ns and ns_triplets.
@@ -680,7 +681,7 @@ XMLPARSEAPI(void)
680
681
  XML_SetUserData(XML_Parser parser, void *userData);
681
682
 
682
683
  /* Returns the last value set by XML_SetUserData or NULL. */
683
- #define XML_GetUserData(parser) (*(void **)(parser))
684
+ # define XML_GetUserData(parser) (*(void **)(parser))
684
685
 
685
686
  /* This is equivalent to supplying an encoding argument to
686
687
  XML_ParserCreate. On success XML_SetEncoding returns non-zero,
@@ -752,7 +753,7 @@ XML_GetSpecifiedAttributeCount(XML_Parser parser);
752
753
  XMLPARSEAPI(int)
753
754
  XML_GetIdAttributeIndex(XML_Parser parser);
754
755
 
755
- #ifdef XML_ATTR_INFO
756
+ # ifdef XML_ATTR_INFO
756
757
  /* Source file byte offsets for the start and end of attribute names and values.
757
758
  The value indices are exclusive of surrounding quotes; thus in a UTF-8 source
758
759
  file an attribute value of "blah" will yield:
@@ -773,7 +774,7 @@ typedef struct {
773
774
  */
774
775
  XMLPARSEAPI(const XML_AttrInfo *)
775
776
  XML_GetAttributeInfo(XML_Parser parser);
776
- #endif
777
+ # endif
777
778
 
778
779
  /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
779
780
  detected. The last call to XML_Parse must have isFinal true; len
@@ -970,9 +971,9 @@ XMLPARSEAPI(const char *)
970
971
  XML_GetInputContext(XML_Parser parser, int *offset, int *size);
971
972
 
972
973
  /* For backwards compatibility with previous versions. */
973
- #define XML_GetErrorLineNumber XML_GetCurrentLineNumber
974
- #define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
975
- #define XML_GetErrorByteIndex XML_GetCurrentByteIndex
974
+ # define XML_GetErrorLineNumber XML_GetCurrentLineNumber
975
+ # define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
976
+ # define XML_GetErrorByteIndex XML_GetCurrentByteIndex
976
977
 
977
978
  /* Frees the content model passed to the element declaration handler */
978
979
  XMLPARSEAPI(void)
@@ -1032,7 +1033,10 @@ enum XML_FeatureEnum {
1032
1033
  XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT,
1033
1034
  XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT,
1034
1035
  /* Added in Expat 2.6.0. */
1035
- XML_FEATURE_GE
1036
+ XML_FEATURE_GE,
1037
+ /* Added in Expat 2.7.2. */
1038
+ XML_FEATURE_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION_DEFAULT,
1039
+ XML_FEATURE_ALLOC_TRACKER_ACTIVATION_THRESHOLD_DEFAULT,
1036
1040
  /* Additional features must be added to the end of this enum. */
1037
1041
  };
1038
1042
 
@@ -1045,7 +1049,7 @@ typedef struct {
1045
1049
  XMLPARSEAPI(const XML_Feature *)
1046
1050
  XML_GetFeatureList(void);
1047
1051
 
1048
- #if defined(XML_DTD) || (defined(XML_GE) && XML_GE == 1)
1052
+ # if defined(XML_DTD) || (defined(XML_GE) && XML_GE == 1)
1049
1053
  /* Added in Expat 2.4.0 for XML_DTD defined and
1050
1054
  * added in Expat 2.6.0 for XML_GE == 1. */
1051
1055
  XMLPARSEAPI(XML_Bool)
@@ -1057,7 +1061,17 @@ XML_SetBillionLaughsAttackProtectionMaximumAmplification(
1057
1061
  XMLPARSEAPI(XML_Bool)
1058
1062
  XML_SetBillionLaughsAttackProtectionActivationThreshold(
1059
1063
  XML_Parser parser, unsigned long long activationThresholdBytes);
1060
- #endif
1064
+
1065
+ /* Added in Expat 2.7.2. */
1066
+ XMLPARSEAPI(XML_Bool)
1067
+ XML_SetAllocTrackerMaximumAmplification(XML_Parser parser,
1068
+ float maximumAmplificationFactor);
1069
+
1070
+ /* Added in Expat 2.7.2. */
1071
+ XMLPARSEAPI(XML_Bool)
1072
+ XML_SetAllocTrackerActivationThreshold(
1073
+ XML_Parser parser, unsigned long long activationThresholdBytes);
1074
+ # endif
1061
1075
 
1062
1076
  /* Added in Expat 2.6.0. */
1063
1077
  XMLPARSEAPI(XML_Bool)
@@ -1066,12 +1080,12 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
1066
1080
  /* Expat follows the semantic versioning convention.
1067
1081
  See https://semver.org
1068
1082
  */
1069
- #define XML_MAJOR_VERSION 2
1070
- #define XML_MINOR_VERSION 7
1071
- #define XML_MICRO_VERSION 1
1083
+ # define XML_MAJOR_VERSION 2
1084
+ # define XML_MINOR_VERSION 7
1085
+ # define XML_MICRO_VERSION 3
1072
1086
 
1073
- #ifdef __cplusplus
1087
+ # ifdef __cplusplus
1074
1088
  }
1075
- #endif
1089
+ # endif
1076
1090
 
1077
1091
  #endif /* not Expat_INCLUDED */
@@ -25,7 +25,7 @@
25
25
  /* Define to 1 if you have the <fcntl.h> header file. */
26
26
  #define HAVE_FCNTL_H 1
27
27
 
28
- /* Define to 1 if you have the `getpagesize' function. */
28
+ /* Define to 1 if you have the 'getpagesize' function. */
29
29
  #define HAVE_GETPAGESIZE 1
30
30
 
31
31
  /* Define to 1 if you have the `getrandom' function. */
@@ -34,10 +34,10 @@
34
34
  /* Define to 1 if you have the <inttypes.h> header file. */
35
35
  #define HAVE_INTTYPES_H 1
36
36
 
37
- /* Define to 1 if you have the `bsd' library (-lbsd). */
37
+ /* Define to 1 if you have the 'bsd' library (-lbsd). */
38
38
  /* #undef HAVE_LIBBSD */
39
39
 
40
- /* Define to 1 if you have a working `mmap' system call. */
40
+ /* Define to 1 if you have a working 'mmap' system call. */
41
41
  /* #undef HAVE_MMAP */
42
42
 
43
43
  /* Define to 1 if you have the <stdint.h> header file. */
@@ -83,7 +83,7 @@
83
83
  #define PACKAGE_NAME "expat"
84
84
 
85
85
  /* Define to the full name and version of this package. */
86
- #define PACKAGE_STRING "expat 2.7.1"
86
+ #define PACKAGE_STRING "expat 2.7.3"
87
87
 
88
88
  /* Define to the one symbol short name of this package. */
89
89
  #define PACKAGE_TARNAME "expat"
@@ -92,15 +92,15 @@
92
92
  #define PACKAGE_URL ""
93
93
 
94
94
  /* Define to the version of this package. */
95
- #define PACKAGE_VERSION "2.7.1"
95
+ #define PACKAGE_VERSION "2.7.3"
96
96
 
97
- /* Define to 1 if all of the C90 standard headers exist (not just the ones
97
+ /* Define to 1 if all of the C89 standard headers exist (not just the ones
98
98
  required in a freestanding environment). This macro is provided for
99
99
  backward compatibility; new code need not use it. */
100
100
  #define STDC_HEADERS 1
101
101
 
102
102
  /* Version number of package */
103
- #define VERSION "2.7.1"
103
+ #define VERSION "2.7.3"
104
104
 
105
105
  /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
106
106
  significant byte first (like Motorola and SPARC, unlike Intel). */
@@ -134,10 +134,10 @@
134
134
  /* Define to make XML Namespaces functionality available. */
135
135
  #define XML_NS 1
136
136
 
137
- /* Define to empty if `const' does not conform to ANSI C. */
137
+ /* Define to empty if 'const' does not conform to ANSI C. */
138
138
  /* #undef const */
139
139
 
140
- /* Define to `long int' if <sys/types.h> does not define. */
140
+ /* Define to 'long int' if <sys/types.h> does not define. */
141
141
  /* #undef off_t */
142
142
 
143
143
  #endif // ndef EXPAT_CONFIG_H
@@ -38,7 +38,7 @@
38
38
  */
39
39
 
40
40
  #ifndef Expat_External_INCLUDED
41
- #define Expat_External_INCLUDED 1
41
+ # define Expat_External_INCLUDED 1
42
42
 
43
43
  /* External API definitions */
44
44
 
@@ -64,12 +64,12 @@
64
64
  compiled with the cdecl calling convention as the default since
65
65
  system headers may assume the cdecl convention.
66
66
  */
67
- #ifndef XMLCALL
68
- # if defined(_MSC_VER)
69
- # define XMLCALL __cdecl
70
- # elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER)
71
- # define XMLCALL __attribute__((cdecl))
72
- # else
67
+ # ifndef XMLCALL
68
+ # if defined(_MSC_VER)
69
+ # define XMLCALL __cdecl
70
+ # elif defined(__GNUC__) && defined(__i386) && ! defined(__INTEL_COMPILER)
71
+ # define XMLCALL __attribute__((cdecl))
72
+ # else
73
73
  /* For any platform which uses this definition and supports more than
74
74
  one calling convention, we need to extend this definition to
75
75
  declare the convention used on that platform, if it's possible to
@@ -80,86 +80,87 @@
80
80
  pre-processor and how to specify the same calling convention as the
81
81
  platform's malloc() implementation.
82
82
  */
83
- # define XMLCALL
84
- # endif
85
- #endif /* not defined XMLCALL */
83
+ # define XMLCALL
84
+ # endif
85
+ # endif /* not defined XMLCALL */
86
86
 
87
- #if ! defined(XML_STATIC) && ! defined(XMLIMPORT)
88
- # ifndef XML_BUILDING_EXPAT
87
+ # if ! defined(XML_STATIC) && ! defined(XMLIMPORT)
88
+ # ifndef XML_BUILDING_EXPAT
89
89
  /* using Expat from an application */
90
90
 
91
- # if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
92
- # define XMLIMPORT __declspec(dllimport)
91
+ # if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) \
92
+ && ! defined(__CYGWIN__)
93
+ # define XMLIMPORT __declspec(dllimport)
94
+ # endif
95
+
93
96
  # endif
97
+ # endif /* not defined XML_STATIC */
94
98
 
99
+ # ifndef XML_ENABLE_VISIBILITY
100
+ # define XML_ENABLE_VISIBILITY 0
95
101
  # endif
96
- #endif /* not defined XML_STATIC */
97
-
98
- #ifndef XML_ENABLE_VISIBILITY
99
- # define XML_ENABLE_VISIBILITY 0
100
- #endif
101
102
 
102
- #if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
103
- # define XMLIMPORT __attribute__((visibility("default")))
104
- #endif
103
+ # if ! defined(XMLIMPORT) && XML_ENABLE_VISIBILITY
104
+ # define XMLIMPORT __attribute__((visibility("default")))
105
+ # endif
105
106
 
106
107
  /* If we didn't define it above, define it away: */
107
- #ifndef XMLIMPORT
108
- # define XMLIMPORT
109
- #endif
110
-
111
- #if defined(__GNUC__) \
112
- && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
113
- # define XML_ATTR_MALLOC __attribute__((__malloc__))
114
- #else
115
- # define XML_ATTR_MALLOC
116
- #endif
117
-
118
- #if defined(__GNUC__) \
119
- && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
120
- # define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
121
- #else
122
- # define XML_ATTR_ALLOC_SIZE(x)
123
- #endif
124
-
125
- #define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
126
-
127
- #ifdef __cplusplus
128
- extern "C" {
129
- #endif
108
+ # ifndef XMLIMPORT
109
+ # define XMLIMPORT
110
+ # endif
111
+
112
+ # if defined(__GNUC__) \
113
+ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
114
+ # define XML_ATTR_MALLOC __attribute__((__malloc__))
115
+ # else
116
+ # define XML_ATTR_MALLOC
117
+ # endif
130
118
 
131
- #ifdef XML_UNICODE_WCHAR_T
132
- # ifndef XML_UNICODE
133
- # define XML_UNICODE
119
+ # if defined(__GNUC__) \
120
+ && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
121
+ # define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
122
+ # else
123
+ # define XML_ATTR_ALLOC_SIZE(x)
134
124
  # endif
135
- # if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
136
- # error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
125
+
126
+ # define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
127
+
128
+ # ifdef __cplusplus
129
+ extern "C" {
137
130
  # endif
138
- #endif
139
131
 
140
- #ifdef XML_UNICODE /* Information is UTF-16 encoded. */
141
132
  # ifdef XML_UNICODE_WCHAR_T
133
+ # ifndef XML_UNICODE
134
+ # define XML_UNICODE
135
+ # endif
136
+ # if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2)
137
+ # error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc"
138
+ # endif
139
+ # endif
140
+
141
+ # ifdef XML_UNICODE /* Information is UTF-16 encoded. */
142
+ # ifdef XML_UNICODE_WCHAR_T
142
143
  typedef wchar_t XML_Char;
143
144
  typedef wchar_t XML_LChar;
144
- # else
145
+ # else
145
146
  typedef unsigned short XML_Char;
146
147
  typedef char XML_LChar;
147
- # endif /* XML_UNICODE_WCHAR_T */
148
- #else /* Information is UTF-8 encoded. */
148
+ # endif /* XML_UNICODE_WCHAR_T */
149
+ # else /* Information is UTF-8 encoded. */
149
150
  typedef char XML_Char;
150
151
  typedef char XML_LChar;
151
- #endif /* XML_UNICODE */
152
+ # endif /* XML_UNICODE */
152
153
 
153
- #ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
154
+ # ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
154
155
  typedef long long XML_Index;
155
156
  typedef unsigned long long XML_Size;
156
- #else
157
+ # else
157
158
  typedef long XML_Index;
158
159
  typedef unsigned long XML_Size;
159
- #endif /* XML_LARGE_SIZE */
160
+ # endif /* XML_LARGE_SIZE */
160
161
 
161
- #ifdef __cplusplus
162
+ # ifdef __cplusplus
162
163
  }
163
- #endif
164
+ # endif
164
165
 
165
166
  #endif /* not Expat_External_INCLUDED */
package/include/jconfig.h CHANGED
@@ -4,34 +4,57 @@
4
4
  #define JPEG_LIB_VERSION 80
5
5
 
6
6
  /* libjpeg-turbo version */
7
- #define LIBJPEG_TURBO_VERSION 4.1.5
7
+ #define LIBJPEG_TURBO_VERSION 5.0.0
8
8
 
9
9
  /* libjpeg-turbo version in integer form */
10
- #define LIBJPEG_TURBO_VERSION_NUMBER 4001005
10
+ #define LIBJPEG_TURBO_VERSION_NUMBER 5000000
11
11
 
12
- /* Support arithmetic encoding */
12
+ /* Support arithmetic encoding when using 8-bit samples */
13
13
  #define C_ARITH_CODING_SUPPORTED 1
14
14
 
15
- /* Support arithmetic decoding */
15
+ /* Support arithmetic decoding when using 8-bit samples */
16
16
  #define D_ARITH_CODING_SUPPORTED 1
17
17
 
18
18
  /* Support in-memory source/destination managers */
19
- /* #undef MEM_SRCDST_SUPPORTED */
19
+ #define MEM_SRCDST_SUPPORTED 1
20
20
 
21
- /* Use accelerated SIMD routines. */
21
+ /* Use accelerated SIMD routines when using 8-bit samples */
22
22
  /* #undef WITH_SIMD */
23
23
 
24
- /*
25
- * Define BITS_IN_JSAMPLE as either
26
- * 8 for 8-bit sample values (the usual setting)
27
- * 12 for 12-bit sample values
28
- * Only 8 and 12 are legal data precisions for lossy JPEG according to the
29
- * JPEG standard, and the IJG code does not support anything else!
30
- * We do not support run-time selection of data precision, sorry.
24
+ /* This version of libjpeg-turbo supports run-time selection of data precision,
25
+ * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build
26
+ * time. However, some downstream software expects the macro to be defined.
27
+ * Since 12-bit data precision is an opt-in feature that requires explicitly
28
+ * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data
29
+ * types, the unmodified portion of the libjpeg API still behaves as if it were
30
+ * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data
31
+ * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here.
31
32
  */
33
+ #ifndef BITS_IN_JSAMPLE
34
+ #define BITS_IN_JSAMPLE 8
35
+ #endif
32
36
 
33
- #define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
37
+ #ifdef _WIN32
38
+
39
+ #undef RIGHT_SHIFT_IS_UNSIGNED
40
+
41
+ /* Define "boolean" as unsigned char, not int, per Windows custom */
42
+ #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
43
+ typedef unsigned char boolean;
44
+ #endif
45
+ #define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
46
+
47
+ /* Define "INT32" as int, not long, per Windows custom */
48
+ #if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
49
+ typedef short INT16;
50
+ typedef signed int INT32;
51
+ #endif
52
+ #define XMD_H /* prevent jmorecfg.h from redefining it */
53
+
54
+ #else
34
55
 
35
56
  /* Define if your (broken) compiler shifts signed values as if they were
36
57
  unsigned. */
37
58
  /* #undef RIGHT_SHIFT_IS_UNSIGNED */
59
+
60
+ #endif
package/include/jerror.h CHANGED
@@ -4,8 +4,10 @@
4
4
  * This file was part of the Independent JPEG Group's software:
5
5
  * Copyright (C) 1994-1997, Thomas G. Lane.
6
6
  * Modified 1997-2009 by Guido Vollbeding.
7
+ * Lossless JPEG Modifications:
8
+ * Copyright (C) 1999, Ken Murchison.
7
9
  * libjpeg-turbo Modifications:
8
- * Copyright (C) 2014, 2017, 2021-2022, D. R. Commander.
10
+ * Copyright (C) 2014, 2017, 2021-2023, D. R. Commander.
9
11
  * For conditions of distribution and use, see the accompanying README.ijg
10
12
  * file.
11
13
  *
@@ -28,7 +30,7 @@
28
30
  #define JMAKE_ENUM_LIST
29
31
  #else
30
32
  /* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
31
- #define JMESSAGE(code,string)
33
+ #define JMESSAGE(code, string)
32
34
  #endif /* JERROR_H */
33
35
  #endif /* JMESSAGE */
34
36
 
@@ -36,7 +38,7 @@
36
38
 
37
39
  typedef enum {
38
40
 
39
- #define JMESSAGE(code,string) code ,
41
+ #define JMESSAGE(code, string) code,
40
42
 
41
43
  #endif /* JMAKE_ENUM_LIST */
42
44
 
@@ -53,7 +55,8 @@ JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS")
53
55
  #if JPEG_LIB_VERSION >= 70
54
56
  JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
55
57
  #endif
56
- JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range")
58
+ JMESSAGE(JERR_BAD_DCT_COEF,
59
+ "DCT coefficient (lossy) or spatial difference (lossless) out of range")
57
60
  JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported")
58
61
  #if JPEG_LIB_VERSION >= 70
59
62
  JMESSAGE(JERR_BAD_DROP_SAMPLING,
@@ -69,9 +72,9 @@ JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan")
69
72
  JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d")
70
73
  JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d")
71
74
  JMESSAGE(JERR_BAD_PROGRESSION,
72
- "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d")
75
+ "Invalid progressive/lossless parameters Ss=%d Se=%d Ah=%d Al=%d")
73
76
  JMESSAGE(JERR_BAD_PROG_SCRIPT,
74
- "Invalid progressive parameters at scan script entry %d")
77
+ "Invalid progressive/lossless parameters at scan script entry %d")
75
78
  JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors")
76
79
  JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d")
77
80
  JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d")
@@ -108,7 +111,7 @@ JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
108
111
  #if JPEG_LIB_VERSION >= 70
109
112
  JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
110
113
  #endif
111
- JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
114
+ JMESSAGE(JERR_NO_BACKING_STORE, "Memory limit exceeded")
112
115
  JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined")
113
116
  JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image")
114
117
  JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined")
@@ -180,7 +183,7 @@ JMESSAGE(JTRC_THUMB_PALETTE,
180
183
  JMESSAGE(JTRC_THUMB_RGB,
181
184
  "JFIF extension marker: RGB thumbnail image, length %u")
182
185
  JMESSAGE(JTRC_UNKNOWN_IDS,
183
- "Unrecognized component IDs %d %d %d, assuming YCbCr")
186
+ "Unrecognized component IDs %d %d %d, assuming YCbCr (lossy) or RGB (lossless)")
184
187
  JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
185
188
  JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
186
189
  JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
@@ -215,6 +218,8 @@ JMESSAGE(JWRN_BOGUS_ICC, "Corrupt JPEG data: bad ICC marker")
215
218
  JMESSAGE(JERR_BAD_DROP_SAMPLING,
216
219
  "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c")
217
220
  #endif
221
+ JMESSAGE(JERR_BAD_RESTART,
222
+ "Invalid restart interval %d; must be an integer multiple of the number of MCUs in an MCU row (%d)")
218
223
 
219
224
  #ifdef JMAKE_ENUM_LIST
220
225
 
@@ -235,25 +240,25 @@ JMESSAGE(JERR_BAD_DROP_SAMPLING,
235
240
  /* The first parameter is either type of cinfo pointer */
236
241
 
237
242
  /* Fatal errors (print message and exit) */
238
- #define ERREXIT(cinfo,code) \
243
+ #define ERREXIT(cinfo, code) \
239
244
  ((cinfo)->err->msg_code = (code), \
240
- (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
241
- #define ERREXIT1(cinfo,code,p1) \
245
+ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
246
+ #define ERREXIT1(cinfo, code, p1) \
242
247
  ((cinfo)->err->msg_code = (code), \
243
248
  (cinfo)->err->msg_parm.i[0] = (p1), \
244
- (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
245
- #define ERREXIT2(cinfo,code,p1,p2) \
249
+ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
250
+ #define ERREXIT2(cinfo, code, p1, p2) \
246
251
  ((cinfo)->err->msg_code = (code), \
247
252
  (cinfo)->err->msg_parm.i[0] = (p1), \
248
253
  (cinfo)->err->msg_parm.i[1] = (p2), \
249
- (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
250
- #define ERREXIT3(cinfo,code,p1,p2,p3) \
254
+ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
255
+ #define ERREXIT3(cinfo, code, p1, p2, p3) \
251
256
  ((cinfo)->err->msg_code = (code), \
252
257
  (cinfo)->err->msg_parm.i[0] = (p1), \
253
258
  (cinfo)->err->msg_parm.i[1] = (p2), \
254
259
  (cinfo)->err->msg_parm.i[2] = (p3), \
255
- (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo)))
256
- #define ERREXIT4(cinfo,code,p1,p2,p3,p4) \
260
+ (*(cinfo)->err->error_exit) ((j_common_ptr)(cinfo)))
261
+ #define ERREXIT4(cinfo, code, p1, p2, p3, p4) \
257
262
  ((cinfo)->err->msg_code = (code), \
258
263
  (cinfo)->err->msg_parm.i[0] = (p1), \
259
264
  (cinfo)->err->msg_parm.i[1] = (p2), \
@@ -278,55 +283,55 @@ JMESSAGE(JERR_BAD_DROP_SAMPLING,
278
283
  #define MAKESTMT(stuff) do { stuff } while (0)
279
284
 
280
285
  /* Nonfatal errors (we can keep going, but the data is probably corrupt) */
281
- #define WARNMS(cinfo,code) \
286
+ #define WARNMS(cinfo, code) \
282
287
  ((cinfo)->err->msg_code = (code), \
283
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
284
- #define WARNMS1(cinfo,code,p1) \
288
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1))
289
+ #define WARNMS1(cinfo, code, p1) \
285
290
  ((cinfo)->err->msg_code = (code), \
286
291
  (cinfo)->err->msg_parm.i[0] = (p1), \
287
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
288
- #define WARNMS2(cinfo,code,p1,p2) \
292
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1))
293
+ #define WARNMS2(cinfo, code, p1, p2) \
289
294
  ((cinfo)->err->msg_code = (code), \
290
295
  (cinfo)->err->msg_parm.i[0] = (p1), \
291
296
  (cinfo)->err->msg_parm.i[1] = (p2), \
292
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1))
297
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), -1))
293
298
 
294
299
  /* Informational/debugging messages */
295
- #define TRACEMS(cinfo,lvl,code) \
300
+ #define TRACEMS(cinfo, lvl, code) \
296
301
  ((cinfo)->err->msg_code = (code), \
297
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
298
- #define TRACEMS1(cinfo,lvl,code,p1) \
302
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
303
+ #define TRACEMS1(cinfo, lvl, code, p1) \
299
304
  ((cinfo)->err->msg_code = (code), \
300
305
  (cinfo)->err->msg_parm.i[0] = (p1), \
301
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
302
- #define TRACEMS2(cinfo,lvl,code,p1,p2) \
306
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
307
+ #define TRACEMS2(cinfo, lvl, code, p1, p2) \
303
308
  ((cinfo)->err->msg_code = (code), \
304
309
  (cinfo)->err->msg_parm.i[0] = (p1), \
305
310
  (cinfo)->err->msg_parm.i[1] = (p2), \
306
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)))
307
- #define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \
308
- MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
311
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)))
312
+ #define TRACEMS3(cinfo, lvl, code, p1, p2, p3) \
313
+ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
309
314
  _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \
310
315
  (cinfo)->err->msg_code = (code); \
311
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
312
- #define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \
313
- MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
316
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
317
+ #define TRACEMS4(cinfo, lvl, code, p1, p2, p3, p4) \
318
+ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
314
319
  _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
315
320
  (cinfo)->err->msg_code = (code); \
316
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
317
- #define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \
318
- MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
321
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
322
+ #define TRACEMS5(cinfo, lvl, code, p1, p2, p3, p4, p5) \
323
+ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
319
324
  _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
320
325
  _mp[4] = (p5); \
321
326
  (cinfo)->err->msg_code = (code); \
322
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
323
- #define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \
324
- MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \
327
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
328
+ #define TRACEMS8(cinfo, lvl, code, p1, p2, p3, p4, p5, p6, p7, p8) \
329
+ MAKESTMT(int *_mp = (cinfo)->err->msg_parm.i; \
325
330
  _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \
326
331
  _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \
327
332
  (cinfo)->err->msg_code = (code); \
328
- (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); )
329
- #define TRACEMSS(cinfo,lvl,code,str) \
333
+ (*(cinfo)->err->emit_message) ((j_common_ptr)(cinfo), (lvl)); )
334
+ #define TRACEMSS(cinfo, lvl, code, str) \
330
335
  ((cinfo)->err->msg_code = (code), \
331
336
  strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \
332
337
  (cinfo)->err->msg_parm.s[JMSG_STR_PARM_MAX - 1] = '\0', \