sharp 0.28.2 → 0.29.2

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/src/pipeline.h CHANGED
@@ -90,10 +90,12 @@ struct PipelineBaton {
90
90
  bool flatten;
91
91
  std::vector<double> flattenBackground;
92
92
  bool negate;
93
+ bool negateAlpha;
93
94
  double blurSigma;
94
95
  double brightness;
95
96
  double saturation;
96
97
  int hue;
98
+ double lightness;
97
99
  int medianSize;
98
100
  double sharpenSigma;
99
101
  double sharpenFlat;
@@ -109,6 +111,9 @@ struct PipelineBaton {
109
111
  double gammaOut;
110
112
  bool greyscale;
111
113
  bool normalise;
114
+ int claheWidth;
115
+ int claheHeight;
116
+ int claheMaxSlope;
112
117
  bool useExifOrientation;
113
118
  int angle;
114
119
  double rotationAngle;
@@ -142,8 +147,13 @@ struct PipelineBaton {
142
147
  bool pngAdaptiveFiltering;
143
148
  bool pngPalette;
144
149
  int pngQuality;
145
- int pngColours;
150
+ int pngBitdepth;
146
151
  double pngDither;
152
+ int jp2Quality;
153
+ bool jp2Lossless;
154
+ int jp2TileHeight;
155
+ int jp2TileWidth;
156
+ std::string jp2ChromaSubsampling;
147
157
  int webpQuality;
148
158
  int webpAlphaQuality;
149
159
  bool webpNearLossless;
@@ -165,12 +175,14 @@ struct PipelineBaton {
165
175
  int heifSpeed;
166
176
  std::string heifChromaSubsampling;
167
177
  bool heifLossless;
178
+ VipsBandFormat rawDepth;
168
179
  std::string err;
169
180
  bool withMetadata;
170
181
  int withMetadataOrientation;
171
182
  double withMetadataDensity;
172
183
  std::string withMetadataIcc;
173
184
  std::unordered_map<std::string, std::string> withMetadataStrs;
185
+ int timeoutSeconds;
174
186
  std::unique_ptr<double[]> convKernel;
175
187
  int convKernelWidth;
176
188
  int convKernelHeight;
@@ -182,6 +194,7 @@ struct PipelineBaton {
182
194
  int extractChannel;
183
195
  bool removeAlpha;
184
196
  double ensureAlpha;
197
+ VipsInterpretation colourspaceInput;
185
198
  VipsInterpretation colourspace;
186
199
  int pageHeight;
187
200
  std::vector<int> delay;
@@ -216,10 +229,12 @@ struct PipelineBaton {
216
229
  flatten(false),
217
230
  flattenBackground{ 0.0, 0.0, 0.0 },
218
231
  negate(false),
232
+ negateAlpha(true),
219
233
  blurSigma(0.0),
220
234
  brightness(1.0),
221
235
  saturation(1.0),
222
236
  hue(0),
237
+ lightness(0),
223
238
  medianSize(0),
224
239
  sharpenSigma(0.0),
225
240
  sharpenFlat(1.0),
@@ -234,6 +249,9 @@ struct PipelineBaton {
234
249
  gamma(0.0),
235
250
  greyscale(false),
236
251
  normalise(false),
252
+ claheWidth(0),
253
+ claheHeight(0),
254
+ claheMaxSlope(3),
237
255
  useExifOrientation(false),
238
256
  angle(0),
239
257
  rotationAngle(0.0),
@@ -266,8 +284,13 @@ struct PipelineBaton {
266
284
  pngAdaptiveFiltering(false),
267
285
  pngPalette(false),
268
286
  pngQuality(100),
269
- pngColours(256),
287
+ pngBitdepth(8),
270
288
  pngDither(1.0),
289
+ jp2Quality(80),
290
+ jp2Lossless(false),
291
+ jp2TileHeight(512),
292
+ jp2TileWidth(512),
293
+ jp2ChromaSubsampling("4:4:4"),
271
294
  webpQuality(80),
272
295
  webpAlphaQuality(100),
273
296
  webpNearLossless(false),
@@ -287,11 +310,13 @@ struct PipelineBaton {
287
310
  heifQuality(50),
288
311
  heifCompression(VIPS_FOREIGN_HEIF_COMPRESSION_AV1),
289
312
  heifSpeed(5),
290
- heifChromaSubsampling("4:2:0"),
313
+ heifChromaSubsampling("4:4:4"),
291
314
  heifLossless(false),
315
+ rawDepth(VIPS_FORMAT_UCHAR),
292
316
  withMetadata(false),
293
317
  withMetadataOrientation(-1),
294
318
  withMetadataDensity(0.0),
319
+ timeoutSeconds(0),
295
320
  convKernelWidth(0),
296
321
  convKernelHeight(0),
297
322
  convKernelScale(0.0),
@@ -302,6 +327,7 @@ struct PipelineBaton {
302
327
  extractChannel(-1),
303
328
  removeAlpha(false),
304
329
  ensureAlpha(-1.0),
330
+ colourspaceInput(VIPS_INTERPRETATION_LAST),
305
331
  colourspace(VIPS_INTERPRETATION_LAST),
306
332
  pageHeight(0),
307
333
  delay{-1},
package/src/utilities.cc CHANGED
@@ -115,7 +115,7 @@ Napi::Value format(const Napi::CallbackInfo& info) {
115
115
  Napi::Object format = Napi::Object::New(env);
116
116
  for (std::string const f : {
117
117
  "jpeg", "png", "webp", "tiff", "magick", "openslide", "dz",
118
- "ppm", "fits", "gif", "svg", "heif", "pdf", "vips"
118
+ "ppm", "fits", "gif", "svg", "heif", "pdf", "vips", "jp2k"
119
119
  }) {
120
120
  // Input
121
121
  Napi::Boolean hasInputFile =