sharp 0.26.1 → 0.27.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/README.md +3 -3
- package/install/libvips.js +11 -4
- package/lib/channel.js +1 -1
- package/lib/colour.js +7 -0
- package/lib/composite.js +10 -7
- package/lib/constructor.js +58 -15
- package/lib/input.js +41 -10
- package/lib/is.js +10 -0
- package/lib/libvips.js +3 -2
- package/lib/operation.js +99 -0
- package/lib/output.js +71 -19
- package/lib/resize.js +2 -1
- package/lib/utility.js +21 -0
- package/package.json +25 -19
- package/src/common.cc +77 -50
- package/src/common.h +12 -4
- package/src/metadata.cc +6 -0
- package/src/metadata.h +1 -0
- package/src/pipeline.cc +52 -17
- package/src/pipeline.h +25 -4
- package/src/sharp.cc +1 -0
package/src/pipeline.h
CHANGED
|
@@ -40,6 +40,7 @@ struct Composite {
|
|
|
40
40
|
int gravity;
|
|
41
41
|
int left;
|
|
42
42
|
int top;
|
|
43
|
+
bool hasOffset;
|
|
43
44
|
bool tile;
|
|
44
45
|
bool premultiplied;
|
|
45
46
|
|
|
@@ -47,8 +48,9 @@ struct Composite {
|
|
|
47
48
|
input(nullptr),
|
|
48
49
|
mode(VIPS_BLEND_MODE_OVER),
|
|
49
50
|
gravity(0),
|
|
50
|
-
left(
|
|
51
|
-
top(
|
|
51
|
+
left(0),
|
|
52
|
+
top(0),
|
|
53
|
+
hasOffset(false),
|
|
52
54
|
tile(false),
|
|
53
55
|
premultiplied(false) {}
|
|
54
56
|
};
|
|
@@ -79,6 +81,7 @@ struct PipelineBaton {
|
|
|
79
81
|
int cropOffsetLeft;
|
|
80
82
|
int cropOffsetTop;
|
|
81
83
|
bool premultiplied;
|
|
84
|
+
bool tileCentre;
|
|
82
85
|
std::string kernel;
|
|
83
86
|
bool fastShrinkOnLoad;
|
|
84
87
|
double tintA;
|
|
@@ -118,6 +121,13 @@ struct PipelineBaton {
|
|
|
118
121
|
int extendRight;
|
|
119
122
|
std::vector<double> extendBackground;
|
|
120
123
|
bool withoutEnlargement;
|
|
124
|
+
std::vector<double> affineMatrix;
|
|
125
|
+
std::vector<double> affineBackground;
|
|
126
|
+
double affineIdx;
|
|
127
|
+
double affineIdy;
|
|
128
|
+
double affineOdx;
|
|
129
|
+
double affineOdy;
|
|
130
|
+
vips::VInterpolate affineInterpolator;
|
|
121
131
|
int jpegQuality;
|
|
122
132
|
bool jpegProgressive;
|
|
123
133
|
std::string jpegChromaSubsampling;
|
|
@@ -151,6 +161,8 @@ struct PipelineBaton {
|
|
|
151
161
|
double tiffYres;
|
|
152
162
|
int heifQuality;
|
|
153
163
|
VipsForeignHeifCompression heifCompression;
|
|
164
|
+
int heifSpeed;
|
|
165
|
+
std::string heifChromaSubsampling;
|
|
154
166
|
bool heifLossless;
|
|
155
167
|
std::string err;
|
|
156
168
|
bool withMetadata;
|
|
@@ -230,6 +242,13 @@ struct PipelineBaton {
|
|
|
230
242
|
extendRight(0),
|
|
231
243
|
extendBackground{ 0.0, 0.0, 0.0, 255.0 },
|
|
232
244
|
withoutEnlargement(false),
|
|
245
|
+
affineMatrix{ 1.0, 0.0, 0.0, 1.0 },
|
|
246
|
+
affineBackground{ 0.0, 0.0, 0.0, 255.0 },
|
|
247
|
+
affineIdx(0),
|
|
248
|
+
affineIdy(0),
|
|
249
|
+
affineOdx(0),
|
|
250
|
+
affineOdy(0),
|
|
251
|
+
affineInterpolator(vips::VInterpolate::new_from_name("bicubic")),
|
|
233
252
|
jpegQuality(80),
|
|
234
253
|
jpegProgressive(false),
|
|
235
254
|
jpegChromaSubsampling("4:2:0"),
|
|
@@ -261,8 +280,10 @@ struct PipelineBaton {
|
|
|
261
280
|
tiffTileWidth(256),
|
|
262
281
|
tiffXres(1.0),
|
|
263
282
|
tiffYres(1.0),
|
|
264
|
-
heifQuality(
|
|
265
|
-
heifCompression(
|
|
283
|
+
heifQuality(50),
|
|
284
|
+
heifCompression(VIPS_FOREIGN_HEIF_COMPRESSION_AV1),
|
|
285
|
+
heifSpeed(5),
|
|
286
|
+
heifChromaSubsampling("4:2:0"),
|
|
266
287
|
heifLossless(false),
|
|
267
288
|
withMetadata(false),
|
|
268
289
|
withMetadataOrientation(-1),
|