@revizly/sharp 0.35.0-revizly43 → 0.35.0-revizly45

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/output.cjs CHANGED
@@ -33,7 +33,7 @@ const jp2Regex = /\.(jp[2x]|j2[kc])$/i;
33
33
 
34
34
  const errJp2Save = () => new Error('JP2 output requires libvips with support for OpenJPEG');
35
35
 
36
- const bitdepthFromColourCount = (colours) => 1 << 31 - Math.clz32(Math.ceil(Math.log2(colours)));
36
+ const bitdepthFromColourCount = (colours) => 1 << 32 - Math.clz32(Math.ceil(Math.log2(colours)) - 1);
37
37
 
38
38
  /**
39
39
  * Write output image data to a file.
package/dist/output.mjs CHANGED
@@ -33,7 +33,7 @@ const jp2Regex = /\.(jp[2x]|j2[kc])$/i;
33
33
 
34
34
  const errJp2Save = () => new Error('JP2 output requires libvips with support for OpenJPEG');
35
35
 
36
- const bitdepthFromColourCount = (colours) => 1 << 31 - Math.clz32(Math.ceil(Math.log2(colours)));
36
+ const bitdepthFromColourCount = (colours) => 1 << 32 - Math.clz32(Math.ceil(Math.log2(colours)) - 1);
37
37
 
38
38
  /**
39
39
  * Write output image data to a file.
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-revizly43",
4
+ "version": "0.35.0-revizly45",
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.44",
167
- "@revizly/sharp-libvips-linux-x64": "1.0.44",
168
- "@revizly/sharp-linux-arm64": "0.35.0-revizly43",
169
- "@revizly/sharp-linux-x64": "0.35.0-revizly43"
166
+ "@revizly/sharp-libvips-linux-arm64": "1.0.46",
167
+ "@revizly/sharp-libvips-linux-x64": "1.0.46",
168
+ "@revizly/sharp-linux-arm64": "0.35.0-revizly45",
169
+ "@revizly/sharp-linux-x64": "0.35.0-revizly45"
170
170
  },
171
171
  "peerDependenciesMeta": {
172
172
  "@types/node": {
@@ -174,12 +174,12 @@
174
174
  }
175
175
  },
176
176
  "devDependencies": {
177
- "@biomejs/biome": "^2.5.1",
177
+ "@biomejs/biome": "^2.5.5",
178
178
  "@cpplint/cli": "^0.1.0",
179
- "@emnapi/runtime": "^1.11.1",
180
- "@revizly/sharp-libvips-dev": "1.0.44",
179
+ "@emnapi/runtime": "^1.11.2",
180
+ "@revizly/sharp-libvips-dev": "1.0.46",
181
181
  "@types/node": "*",
182
- "emnapi": "^1.11.1",
182
+ "emnapi": "^1.11.2",
183
183
  "exif-reader": "^2.0.3",
184
184
  "extract-zip": "^2.0.1",
185
185
  "icc": "^4.0.0",
@@ -194,7 +194,7 @@
194
194
  "node": ">=20.9.0"
195
195
  },
196
196
  "config": {
197
- "libvips": ">=8.18.4"
197
+ "libvips": ">=8.18.5"
198
198
  },
199
199
  "funding": {
200
200
  "url": "https://opencollective.com/libvips"
package/src/common.cc CHANGED
@@ -118,7 +118,7 @@ namespace sharp {
118
118
  descriptor->openSlideLevel = AttrAsUint32(input, "openSlideLevel");
119
119
  }
120
120
  // subIFD (OME-TIFF)
121
- if (HasAttr(input, "subifd")) {
121
+ if (HasAttr(input, "tiffSubifd")) {
122
122
  descriptor->tiffSubifd = AttrAsInt32(input, "tiffSubifd");
123
123
  }
124
124
  // // PDF background color
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 < 4)
23
- #error "libvips version 8.18.4+ is required - please see https://sharp.pixelplumbing.com/install"
22
+ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION < 5)
23
+ #error "libvips version 8.18.5+ is required - please see https://sharp.pixelplumbing.com/install"
24
24
  #endif
25
25
 
26
26
  #if defined(__has_include)