@revizly/sharp 0.34.1-revizly1 → 0.34.1-revizly11

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.
@@ -298,7 +298,7 @@ const Sharp = function (input, options) {
298
298
  withExif: {},
299
299
  withExifMerge: true,
300
300
  resolveWithObject: false,
301
- loop: 1,
301
+ loop: -1,
302
302
  delay: [],
303
303
  // output format
304
304
  jpegQuality: 80,
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.34.1-revizly1",
4
+ "version": "0.34.1-revizly11",
5
5
  "author": "Lovell Fuller <npm@lovell.info>",
6
6
  "homepage": "https://sharp.pixelplumbing.com",
7
7
  "contributors": [
@@ -142,14 +142,14 @@
142
142
  "semver": "^7.7.1"
143
143
  },
144
144
  "optionalDependencies": {
145
- "@revizly/sharp-libvips-linux-arm64": "1.0.12",
146
- "@revizly/sharp-libvips-linux-x64": "1.0.12",
147
- "@revizly/sharp-linux-arm64": "0.34.0-revizly8",
148
- "@revizly/sharp-linux-x64": "0.34.0-revizly8"
145
+ "@revizly/sharp-libvips-linux-arm64": "1.0.19",
146
+ "@revizly/sharp-libvips-linux-x64": "1.0.19",
147
+ "@revizly/sharp-linux-arm64": "0.34.1-revizly9",
148
+ "@revizly/sharp-linux-x64": "0.34.1-revizly9"
149
149
  },
150
150
  "devDependencies": {
151
151
  "@emnapi/runtime": "^1.4.0",
152
- "@revizly/sharp-libvips-dev": "1.0.11",
152
+ "@revizly/sharp-libvips-dev": "1.0.19",
153
153
  "@types/node": "*",
154
154
  "cc": "^3.0.1",
155
155
  "emnapi": "^1.4.0",
@@ -171,7 +171,7 @@
171
171
  "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
172
172
  },
173
173
  "config": {
174
- "libvips": ">=8.16.1"
174
+ "libvips": ">=8.17.0"
175
175
  },
176
176
  "funding": {
177
177
  "url": "https://opencollective.com/libvips"
package/src/common.cc CHANGED
@@ -651,22 +651,21 @@ namespace sharp {
651
651
  */
652
652
  VImage SetAnimationProperties(VImage image, int nPages, int pageHeight, std::vector<int> delay, int loop) {
653
653
  bool hasDelay = !delay.empty();
654
-
655
- // Avoid a copy if none of the animation properties are needed.
656
- if (nPages == 1 && !hasDelay && loop == -1) return image;
657
-
658
- if (delay.size() == 1) {
659
- // We have just one delay, repeat that value for all frames.
660
- delay.insert(delay.end(), nPages - 1, delay[0]);
661
- }
662
-
663
- // Attaching metadata, need to copy the image.
664
654
  VImage copy = image.copy();
665
655
 
666
656
  // Only set page-height if we have more than one page, or this could
667
657
  // accidentally turn into an animated image later.
668
658
  if (nPages > 1) copy.set(VIPS_META_PAGE_HEIGHT, pageHeight);
669
- if (hasDelay) copy.set("delay", delay);
659
+ if (hasDelay) {
660
+ if (delay.size() == 1) {
661
+ // We have just one delay, repeat that value for all frames.
662
+ delay.insert(delay.end(), nPages - 1, delay[0]);
663
+ }
664
+ copy.set("delay", delay);
665
+ }
666
+ if (nPages == 1 && !hasDelay && loop == -1) {
667
+ loop = 1;
668
+ }
670
669
  if (loop != -1) copy.set("loop", loop);
671
670
 
672
671
  return copy;
package/src/common.h CHANGED
@@ -15,9 +15,9 @@
15
15
  // Verify platform and compiler compatibility
16
16
 
17
17
  #if (VIPS_MAJOR_VERSION < 8) || \
18
- (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 16) || \
19
- (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 16 && VIPS_MICRO_VERSION < 1)
20
- #error "libvips version 8.16.1+ is required - please see https://sharp.pixelplumbing.com/install"
18
+ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \
19
+ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 0)
20
+ #error "libvips version 8.17.0+ is required - please see https://sharp.pixelplumbing.com/install"
21
21
  #endif
22
22
 
23
23
  #if defined(__has_include)
package/src/pipeline.h CHANGED
@@ -384,7 +384,7 @@ struct PipelineBaton {
384
384
  ensureAlpha(-1.0),
385
385
  colourspacePipeline(VIPS_INTERPRETATION_LAST),
386
386
  colourspace(VIPS_INTERPRETATION_LAST),
387
- loop(1),
387
+ loop(-1),
388
388
  tileSize(256),
389
389
  tileOverlap(0),
390
390
  tileContainer(VIPS_FOREIGN_DZ_CONTAINER_FS),