@revizly/sharp 0.35.0-revizly46 → 0.35.0-revizly48
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/dist/constructor.cjs +1 -1
- package/dist/constructor.mjs +1 -1
- package/dist/input.cjs +20 -15
- package/dist/input.mjs +20 -15
- package/dist/operation.cjs +4 -0
- package/dist/operation.mjs +4 -0
- package/dist/output.cjs +3 -6
- package/dist/output.mjs +3 -6
- package/dist/resize.cjs +8 -8
- package/dist/resize.mjs +8 -8
- package/package.json +13 -13
- package/src/common.cc +6 -3
- package/src/common.h +2 -2
package/dist/constructor.cjs
CHANGED
|
@@ -493,7 +493,7 @@ function clone () {
|
|
|
493
493
|
clone.options.queueListener = queueListener;
|
|
494
494
|
// Pass 'finish' event to clone for Stream-based input
|
|
495
495
|
if (this._isStreamInput()) {
|
|
496
|
-
this.
|
|
496
|
+
this._whenStreamInFinished(() => {
|
|
497
497
|
// Clone inherits input data
|
|
498
498
|
this._flattenBufferIn();
|
|
499
499
|
clone.options.input.buffer = this.options.input.buffer;
|
package/dist/constructor.mjs
CHANGED
|
@@ -493,7 +493,7 @@ function clone () {
|
|
|
493
493
|
clone.options.queueListener = queueListener;
|
|
494
494
|
// Pass 'finish' event to clone for Stream-based input
|
|
495
495
|
if (this._isStreamInput()) {
|
|
496
|
-
this.
|
|
496
|
+
this._whenStreamInFinished(() => {
|
|
497
497
|
// Clone inherits input data
|
|
498
498
|
this._flattenBufferIn();
|
|
499
499
|
clone.options.input.buffer = this.options.input.buffer;
|
package/dist/input.cjs
CHANGED
|
@@ -531,11 +531,6 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
|
|
|
531
531
|
function _write (chunk, _encoding, callback) {
|
|
532
532
|
if (Array.isArray(this.options.input.buffer)) {
|
|
533
533
|
if (is.buffer(chunk)) {
|
|
534
|
-
if (this.options.input.buffer.length === 0) {
|
|
535
|
-
this.on('finish', () => {
|
|
536
|
-
this.streamInFinished = true;
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
534
|
this.options.input.buffer.push(chunk);
|
|
540
535
|
callback();
|
|
541
536
|
} else {
|
|
@@ -565,6 +560,20 @@ function _isStreamInput () {
|
|
|
565
560
|
return Array.isArray(this.options.input.buffer);
|
|
566
561
|
}
|
|
567
562
|
|
|
563
|
+
/**
|
|
564
|
+
* Call fn when the Writable side of Stream-based input has finished,
|
|
565
|
+
* or immediately when it already has, as 'finish' is emitted only once.
|
|
566
|
+
* @private
|
|
567
|
+
* @param {Function} fn
|
|
568
|
+
*/
|
|
569
|
+
function _whenStreamInFinished (fn) {
|
|
570
|
+
if (this.writableFinished) {
|
|
571
|
+
fn();
|
|
572
|
+
} else {
|
|
573
|
+
this.once('finish', fn);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
568
577
|
/**
|
|
569
578
|
* Fast access to (uncached) image metadata without decoding any compressed pixel data.
|
|
570
579
|
*
|
|
@@ -642,7 +651,7 @@ function metadata (callback) {
|
|
|
642
651
|
const stack = Error();
|
|
643
652
|
if (is.fn(callback)) {
|
|
644
653
|
if (this._isStreamInput()) {
|
|
645
|
-
this.
|
|
654
|
+
this._whenStreamInFinished(() => {
|
|
646
655
|
this._flattenBufferIn();
|
|
647
656
|
sharp.metadata(this.options, (err, metadata) => {
|
|
648
657
|
if (err) {
|
|
@@ -665,7 +674,7 @@ function metadata (callback) {
|
|
|
665
674
|
} else {
|
|
666
675
|
if (this._isStreamInput()) {
|
|
667
676
|
return new Promise((resolve, reject) => {
|
|
668
|
-
|
|
677
|
+
this._whenStreamInFinished(() => {
|
|
669
678
|
this._flattenBufferIn();
|
|
670
679
|
sharp.metadata(this.options, (err, metadata) => {
|
|
671
680
|
if (err) {
|
|
@@ -674,12 +683,7 @@ function metadata (callback) {
|
|
|
674
683
|
resolve(metadata);
|
|
675
684
|
}
|
|
676
685
|
});
|
|
677
|
-
};
|
|
678
|
-
if (this.writableFinished) {
|
|
679
|
-
finished();
|
|
680
|
-
} else {
|
|
681
|
-
this.once('finish', finished);
|
|
682
|
-
}
|
|
686
|
+
});
|
|
683
687
|
});
|
|
684
688
|
} else {
|
|
685
689
|
return new Promise((resolve, reject) => {
|
|
@@ -744,7 +748,7 @@ function stats (callback) {
|
|
|
744
748
|
const stack = Error();
|
|
745
749
|
if (is.fn(callback)) {
|
|
746
750
|
if (this._isStreamInput()) {
|
|
747
|
-
this.
|
|
751
|
+
this._whenStreamInFinished(() => {
|
|
748
752
|
this._flattenBufferIn();
|
|
749
753
|
sharp.stats(this.options, (err, stats) => {
|
|
750
754
|
if (err) {
|
|
@@ -767,7 +771,7 @@ function stats (callback) {
|
|
|
767
771
|
} else {
|
|
768
772
|
if (this._isStreamInput()) {
|
|
769
773
|
return new Promise((resolve, reject) => {
|
|
770
|
-
this.
|
|
774
|
+
this._whenStreamInFinished(() => {
|
|
771
775
|
this._flattenBufferIn();
|
|
772
776
|
sharp.stats(this.options, (err, stats) => {
|
|
773
777
|
if (err) {
|
|
@@ -805,6 +809,7 @@ module.exports = (Sharp) => {
|
|
|
805
809
|
_write,
|
|
806
810
|
_flattenBufferIn,
|
|
807
811
|
_isStreamInput,
|
|
812
|
+
_whenStreamInFinished,
|
|
808
813
|
// Public
|
|
809
814
|
metadata,
|
|
810
815
|
stats
|
package/dist/input.mjs
CHANGED
|
@@ -531,11 +531,6 @@ function _createInputDescriptor (input, inputOptions, containerOptions) {
|
|
|
531
531
|
function _write (chunk, _encoding, callback) {
|
|
532
532
|
if (Array.isArray(this.options.input.buffer)) {
|
|
533
533
|
if (is.buffer(chunk)) {
|
|
534
|
-
if (this.options.input.buffer.length === 0) {
|
|
535
|
-
this.on('finish', () => {
|
|
536
|
-
this.streamInFinished = true;
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
534
|
this.options.input.buffer.push(chunk);
|
|
540
535
|
callback();
|
|
541
536
|
} else {
|
|
@@ -565,6 +560,20 @@ function _isStreamInput () {
|
|
|
565
560
|
return Array.isArray(this.options.input.buffer);
|
|
566
561
|
}
|
|
567
562
|
|
|
563
|
+
/**
|
|
564
|
+
* Call fn when the Writable side of Stream-based input has finished,
|
|
565
|
+
* or immediately when it already has, as 'finish' is emitted only once.
|
|
566
|
+
* @private
|
|
567
|
+
* @param {Function} fn
|
|
568
|
+
*/
|
|
569
|
+
function _whenStreamInFinished (fn) {
|
|
570
|
+
if (this.writableFinished) {
|
|
571
|
+
fn();
|
|
572
|
+
} else {
|
|
573
|
+
this.once('finish', fn);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
568
577
|
/**
|
|
569
578
|
* Fast access to (uncached) image metadata without decoding any compressed pixel data.
|
|
570
579
|
*
|
|
@@ -642,7 +651,7 @@ function metadata (callback) {
|
|
|
642
651
|
const stack = Error();
|
|
643
652
|
if (is.fn(callback)) {
|
|
644
653
|
if (this._isStreamInput()) {
|
|
645
|
-
this.
|
|
654
|
+
this._whenStreamInFinished(() => {
|
|
646
655
|
this._flattenBufferIn();
|
|
647
656
|
sharp.metadata(this.options, (err, metadata) => {
|
|
648
657
|
if (err) {
|
|
@@ -665,7 +674,7 @@ function metadata (callback) {
|
|
|
665
674
|
} else {
|
|
666
675
|
if (this._isStreamInput()) {
|
|
667
676
|
return new Promise((resolve, reject) => {
|
|
668
|
-
|
|
677
|
+
this._whenStreamInFinished(() => {
|
|
669
678
|
this._flattenBufferIn();
|
|
670
679
|
sharp.metadata(this.options, (err, metadata) => {
|
|
671
680
|
if (err) {
|
|
@@ -674,12 +683,7 @@ function metadata (callback) {
|
|
|
674
683
|
resolve(metadata);
|
|
675
684
|
}
|
|
676
685
|
});
|
|
677
|
-
};
|
|
678
|
-
if (this.writableFinished) {
|
|
679
|
-
finished();
|
|
680
|
-
} else {
|
|
681
|
-
this.once('finish', finished);
|
|
682
|
-
}
|
|
686
|
+
});
|
|
683
687
|
});
|
|
684
688
|
} else {
|
|
685
689
|
return new Promise((resolve, reject) => {
|
|
@@ -744,7 +748,7 @@ function stats (callback) {
|
|
|
744
748
|
const stack = Error();
|
|
745
749
|
if (is.fn(callback)) {
|
|
746
750
|
if (this._isStreamInput()) {
|
|
747
|
-
this.
|
|
751
|
+
this._whenStreamInFinished(() => {
|
|
748
752
|
this._flattenBufferIn();
|
|
749
753
|
sharp.stats(this.options, (err, stats) => {
|
|
750
754
|
if (err) {
|
|
@@ -767,7 +771,7 @@ function stats (callback) {
|
|
|
767
771
|
} else {
|
|
768
772
|
if (this._isStreamInput()) {
|
|
769
773
|
return new Promise((resolve, reject) => {
|
|
770
|
-
this.
|
|
774
|
+
this._whenStreamInFinished(() => {
|
|
771
775
|
this._flattenBufferIn();
|
|
772
776
|
sharp.stats(this.options, (err, stats) => {
|
|
773
777
|
if (err) {
|
|
@@ -805,6 +809,7 @@ export default (Sharp) => {
|
|
|
805
809
|
_write,
|
|
806
810
|
_flattenBufferIn,
|
|
807
811
|
_isStreamInput,
|
|
812
|
+
_whenStreamInFinished,
|
|
808
813
|
// Public
|
|
809
814
|
metadata,
|
|
810
815
|
stats
|
package/dist/operation.cjs
CHANGED
|
@@ -78,6 +78,10 @@ function rotate (angle, options) {
|
|
|
78
78
|
* Auto-orient based on the EXIF `Orientation` tag, then remove the tag.
|
|
79
79
|
* Mirroring is supported and may infer the use of a flip operation.
|
|
80
80
|
*
|
|
81
|
+
* Only the EXIF `Orientation` tag is considered; orientation carried in other
|
|
82
|
+
* places, such as an XMP `tiff:Orientation` element, is left untouched and
|
|
83
|
+
* remains the responsibility of the consumer.
|
|
84
|
+
*
|
|
81
85
|
* Previous or subsequent use of `rotate(angle)` and either `flip()` or `flop()`
|
|
82
86
|
* will logically occur after auto-orientation, regardless of call order.
|
|
83
87
|
*
|
package/dist/operation.mjs
CHANGED
|
@@ -78,6 +78,10 @@ function rotate (angle, options) {
|
|
|
78
78
|
* Auto-orient based on the EXIF `Orientation` tag, then remove the tag.
|
|
79
79
|
* Mirroring is supported and may infer the use of a flip operation.
|
|
80
80
|
*
|
|
81
|
+
* Only the EXIF `Orientation` tag is considered; orientation carried in other
|
|
82
|
+
* places, such as an XMP `tiff:Orientation` element, is left untouched and
|
|
83
|
+
* remains the responsibility of the consumer.
|
|
84
|
+
*
|
|
81
85
|
* Previous or subsequent use of `rotate(angle)` and either `flip()` or `flop()`
|
|
82
86
|
* will logically occur after auto-orientation, regardless of call order.
|
|
83
87
|
*
|
package/dist/output.cjs
CHANGED
|
@@ -1656,7 +1656,7 @@ function _pipeline (callback, stack) {
|
|
|
1656
1656
|
// output=file/buffer
|
|
1657
1657
|
if (this._isStreamInput()) {
|
|
1658
1658
|
// output=file/buffer, input=stream
|
|
1659
|
-
this.
|
|
1659
|
+
this._whenStreamInFinished(() => {
|
|
1660
1660
|
this._flattenBufferIn();
|
|
1661
1661
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
1662
1662
|
if (err) {
|
|
@@ -1681,7 +1681,7 @@ function _pipeline (callback, stack) {
|
|
|
1681
1681
|
// output=stream
|
|
1682
1682
|
if (this._isStreamInput()) {
|
|
1683
1683
|
// output=stream, input=stream
|
|
1684
|
-
this.
|
|
1684
|
+
this._whenStreamInFinished(() => {
|
|
1685
1685
|
this._flattenBufferIn();
|
|
1686
1686
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
1687
1687
|
if (err) {
|
|
@@ -1694,9 +1694,6 @@ function _pipeline (callback, stack) {
|
|
|
1694
1694
|
this.on('end', () => this.emit('close'));
|
|
1695
1695
|
});
|
|
1696
1696
|
});
|
|
1697
|
-
if (this.streamInFinished) {
|
|
1698
|
-
this.emit('finish');
|
|
1699
|
-
}
|
|
1700
1697
|
} else {
|
|
1701
1698
|
// output=stream, input=file/buffer
|
|
1702
1699
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
@@ -1716,7 +1713,7 @@ function _pipeline (callback, stack) {
|
|
|
1716
1713
|
if (this._isStreamInput()) {
|
|
1717
1714
|
// output=promise, input=stream
|
|
1718
1715
|
return new Promise((resolve, reject) => {
|
|
1719
|
-
this.
|
|
1716
|
+
this._whenStreamInFinished(() => {
|
|
1720
1717
|
this._flattenBufferIn();
|
|
1721
1718
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
1722
1719
|
if (err) {
|
package/dist/output.mjs
CHANGED
|
@@ -1656,7 +1656,7 @@ function _pipeline (callback, stack) {
|
|
|
1656
1656
|
// output=file/buffer
|
|
1657
1657
|
if (this._isStreamInput()) {
|
|
1658
1658
|
// output=file/buffer, input=stream
|
|
1659
|
-
this.
|
|
1659
|
+
this._whenStreamInFinished(() => {
|
|
1660
1660
|
this._flattenBufferIn();
|
|
1661
1661
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
1662
1662
|
if (err) {
|
|
@@ -1681,7 +1681,7 @@ function _pipeline (callback, stack) {
|
|
|
1681
1681
|
// output=stream
|
|
1682
1682
|
if (this._isStreamInput()) {
|
|
1683
1683
|
// output=stream, input=stream
|
|
1684
|
-
this.
|
|
1684
|
+
this._whenStreamInFinished(() => {
|
|
1685
1685
|
this._flattenBufferIn();
|
|
1686
1686
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
1687
1687
|
if (err) {
|
|
@@ -1694,9 +1694,6 @@ function _pipeline (callback, stack) {
|
|
|
1694
1694
|
this.on('end', () => this.emit('close'));
|
|
1695
1695
|
});
|
|
1696
1696
|
});
|
|
1697
|
-
if (this.streamInFinished) {
|
|
1698
|
-
this.emit('finish');
|
|
1699
|
-
}
|
|
1700
1697
|
} else {
|
|
1701
1698
|
// output=stream, input=file/buffer
|
|
1702
1699
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
@@ -1716,7 +1713,7 @@ function _pipeline (callback, stack) {
|
|
|
1716
1713
|
if (this._isStreamInput()) {
|
|
1717
1714
|
// output=promise, input=stream
|
|
1718
1715
|
return new Promise((resolve, reject) => {
|
|
1719
|
-
this.
|
|
1716
|
+
this._whenStreamInFinished(() => {
|
|
1720
1717
|
this._flattenBufferIn();
|
|
1721
1718
|
sharp.pipeline(this.options, (err, data, info) => {
|
|
1722
1719
|
if (err) {
|
package/dist/resize.cjs
CHANGED
|
@@ -265,19 +265,19 @@ function resize (widthOrOptions, height, options) {
|
|
|
265
265
|
if (is.defined(widthOrOptions)) {
|
|
266
266
|
if (is.object(widthOrOptions) && !is.defined(options)) {
|
|
267
267
|
options = widthOrOptions;
|
|
268
|
-
} else if (is.integer(widthOrOptions) && widthOrOptions
|
|
268
|
+
} else if (is.integer(widthOrOptions) && is.inRange(widthOrOptions, 1, 100000000)) {
|
|
269
269
|
this.options.width = widthOrOptions;
|
|
270
270
|
} else {
|
|
271
|
-
throw is.invalidParameterError('width', 'positive integer', widthOrOptions);
|
|
271
|
+
throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', widthOrOptions);
|
|
272
272
|
}
|
|
273
273
|
} else {
|
|
274
274
|
this.options.width = -1;
|
|
275
275
|
}
|
|
276
276
|
if (is.defined(height)) {
|
|
277
|
-
if (is.integer(height) && height
|
|
277
|
+
if (is.integer(height) && is.inRange(height, 1, 100000000)) {
|
|
278
278
|
this.options.height = height;
|
|
279
279
|
} else {
|
|
280
|
-
throw is.invalidParameterError('height', 'positive integer', height);
|
|
280
|
+
throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', height);
|
|
281
281
|
}
|
|
282
282
|
} else {
|
|
283
283
|
this.options.height = -1;
|
|
@@ -285,18 +285,18 @@ function resize (widthOrOptions, height, options) {
|
|
|
285
285
|
if (is.object(options)) {
|
|
286
286
|
// Width
|
|
287
287
|
if (is.defined(options.width)) {
|
|
288
|
-
if (is.integer(options.width) && options.width
|
|
288
|
+
if (is.integer(options.width) && is.inRange(options.width, 1, 100000000)) {
|
|
289
289
|
this.options.width = options.width;
|
|
290
290
|
} else {
|
|
291
|
-
throw is.invalidParameterError('width', 'positive integer', options.width);
|
|
291
|
+
throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', options.width);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
// Height
|
|
295
295
|
if (is.defined(options.height)) {
|
|
296
|
-
if (is.integer(options.height) && options.height
|
|
296
|
+
if (is.integer(options.height) && is.inRange(options.height, 1, 100000000)) {
|
|
297
297
|
this.options.height = options.height;
|
|
298
298
|
} else {
|
|
299
|
-
throw is.invalidParameterError('height', 'positive integer', options.height);
|
|
299
|
+
throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', options.height);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
// Fit
|
package/dist/resize.mjs
CHANGED
|
@@ -265,19 +265,19 @@ function resize (widthOrOptions, height, options) {
|
|
|
265
265
|
if (is.defined(widthOrOptions)) {
|
|
266
266
|
if (is.object(widthOrOptions) && !is.defined(options)) {
|
|
267
267
|
options = widthOrOptions;
|
|
268
|
-
} else if (is.integer(widthOrOptions) && widthOrOptions
|
|
268
|
+
} else if (is.integer(widthOrOptions) && is.inRange(widthOrOptions, 1, 100000000)) {
|
|
269
269
|
this.options.width = widthOrOptions;
|
|
270
270
|
} else {
|
|
271
|
-
throw is.invalidParameterError('width', 'positive integer', widthOrOptions);
|
|
271
|
+
throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', widthOrOptions);
|
|
272
272
|
}
|
|
273
273
|
} else {
|
|
274
274
|
this.options.width = -1;
|
|
275
275
|
}
|
|
276
276
|
if (is.defined(height)) {
|
|
277
|
-
if (is.integer(height) && height
|
|
277
|
+
if (is.integer(height) && is.inRange(height, 1, 100000000)) {
|
|
278
278
|
this.options.height = height;
|
|
279
279
|
} else {
|
|
280
|
-
throw is.invalidParameterError('height', 'positive integer', height);
|
|
280
|
+
throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', height);
|
|
281
281
|
}
|
|
282
282
|
} else {
|
|
283
283
|
this.options.height = -1;
|
|
@@ -285,18 +285,18 @@ function resize (widthOrOptions, height, options) {
|
|
|
285
285
|
if (is.object(options)) {
|
|
286
286
|
// Width
|
|
287
287
|
if (is.defined(options.width)) {
|
|
288
|
-
if (is.integer(options.width) && options.width
|
|
288
|
+
if (is.integer(options.width) && is.inRange(options.width, 1, 100000000)) {
|
|
289
289
|
this.options.width = options.width;
|
|
290
290
|
} else {
|
|
291
|
-
throw is.invalidParameterError('width', 'positive integer', options.width);
|
|
291
|
+
throw is.invalidParameterError('width', 'positive integer between 1 and 100000000', options.width);
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
// Height
|
|
295
295
|
if (is.defined(options.height)) {
|
|
296
|
-
if (is.integer(options.height) && options.height
|
|
296
|
+
if (is.integer(options.height) && is.inRange(options.height, 1, 100000000)) {
|
|
297
297
|
this.options.height = options.height;
|
|
298
298
|
} else {
|
|
299
|
-
throw is.invalidParameterError('height', 'positive integer', options.height);
|
|
299
|
+
throw is.invalidParameterError('height', 'positive integer between 1 and 100000000', options.height);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
// Fit
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revizly/sharp",
|
|
3
3
|
"description": "High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",
|
|
4
|
-
"version": "0.35.0-
|
|
4
|
+
"version": "0.35.0-revizly48",
|
|
5
5
|
"author": "Lovell Fuller <npm@lovell.info>",
|
|
6
6
|
"homepage": "https://sharp.pixelplumbing.com",
|
|
7
7
|
"contributors": [
|
|
@@ -163,10 +163,10 @@
|
|
|
163
163
|
"semver": "^7.8.5"
|
|
164
164
|
},
|
|
165
165
|
"optionalDependencies": {
|
|
166
|
-
"@revizly/sharp-libvips-linux-arm64": "1.0.
|
|
167
|
-
"@revizly/sharp-libvips-linux-x64": "1.0.
|
|
168
|
-
"@revizly/sharp-linux-arm64": "0.35.0-
|
|
169
|
-
"@revizly/sharp-linux-x64": "0.35.0-
|
|
166
|
+
"@revizly/sharp-libvips-linux-arm64": "1.0.49",
|
|
167
|
+
"@revizly/sharp-libvips-linux-x64": "1.0.49",
|
|
168
|
+
"@revizly/sharp-linux-arm64": "0.35.0-revizly48",
|
|
169
|
+
"@revizly/sharp-linux-x64": "0.35.0-revizly48"
|
|
170
170
|
},
|
|
171
171
|
"peerDependenciesMeta": {
|
|
172
172
|
"@types/node": {
|
|
@@ -174,18 +174,18 @@
|
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
"devDependencies": {
|
|
177
|
-
"@biomejs/biome": "^2.5.
|
|
177
|
+
"@biomejs/biome": "^2.5.10",
|
|
178
178
|
"@cpplint/cli": "^0.1.0",
|
|
179
|
-
"@emnapi/runtime": "^1.11.
|
|
180
|
-
"@revizly/sharp-libvips-dev": "1.0.
|
|
179
|
+
"@emnapi/runtime": "^1.11.3",
|
|
180
|
+
"@revizly/sharp-libvips-dev": "1.0.49",
|
|
181
181
|
"@types/node": "*",
|
|
182
|
-
"emnapi": "^1.11.
|
|
182
|
+
"emnapi": "^1.11.3",
|
|
183
183
|
"exif-reader": "^2.0.3",
|
|
184
|
-
"
|
|
184
|
+
"yauzl": "^3.4.0",
|
|
185
185
|
"icc": "^4.0.0",
|
|
186
|
-
"node-addon-api": "^8.9.
|
|
186
|
+
"node-addon-api": "^8.9.2",
|
|
187
187
|
"node-gyp": "^12.4.0",
|
|
188
|
-
"publint": "^0.3.
|
|
188
|
+
"publint": "^0.3.24",
|
|
189
189
|
"tar-fs": "^3.1.3",
|
|
190
190
|
"tsd": "^0.33.0"
|
|
191
191
|
},
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"node": ">=20.9.0"
|
|
195
195
|
},
|
|
196
196
|
"config": {
|
|
197
|
-
"libvips": ">=8.18.
|
|
197
|
+
"libvips": ">=8.18.6"
|
|
198
198
|
},
|
|
199
199
|
"funding": {
|
|
200
200
|
"url": "https://opencollective.com/libvips"
|
package/src/common.cc
CHANGED
|
@@ -711,9 +711,12 @@ namespace sharp {
|
|
|
711
711
|
bool hasDelay = !delay.empty();
|
|
712
712
|
VImage copy = image.copy();
|
|
713
713
|
|
|
714
|
-
// Only set page-height if we have more than one page, or this
|
|
715
|
-
// accidentally turn into an animated image later.
|
|
716
|
-
if (nPages > 1)
|
|
714
|
+
// Only set page-height and n-pages if we have more than one page, or this
|
|
715
|
+
// could accidentally turn into an animated image later.
|
|
716
|
+
if (nPages > 1) {
|
|
717
|
+
copy.set(VIPS_META_PAGE_HEIGHT, pageHeight);
|
|
718
|
+
copy.set(VIPS_META_N_PAGES, nPages);
|
|
719
|
+
}
|
|
717
720
|
if (hasDelay) {
|
|
718
721
|
if (delay.size() == 1) {
|
|
719
722
|
// We have just one delay, repeat that value for all frames.
|
package/src/common.h
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
#if (VIPS_MAJOR_VERSION < 8) || \
|
|
21
21
|
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 18) || \
|
|
22
|
-
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION <
|
|
23
|
-
#error "libvips version 8.18.
|
|
22
|
+
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION < 6)
|
|
23
|
+
#error "libvips version 8.18.6+ is required - please see https://sharp.pixelplumbing.com/install"
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
26
|
#if defined(__has_include)
|