diff --git a/docs/changelog.md b/docs/changelog.md index 220a333a8..283469d18 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,13 +1,11 @@ # Changelog -## v0.33 - *gauge* +## v0.34 - *hat* -Requires libvips v8.15.5-rc1 +Requires libvips v8.16.0-rc1 ### v0.33.6 - TBD -* Upgrade to libvips v8.15.5-rc1 for upstream bug fixes. - * TypeScript: Ensure channel counts use the correct range. [#4197](https://github.com/lovell/sharp/pull/4197) [@DavidVaness](https://github.com/DavidVaness) @@ -20,6 +18,10 @@ Requires libvips v8.15.5-rc1 [#4207](https://github.com/lovell/sharp/pull/4207) [@calebmer](https://github.com/calebmer) +## v0.33 - *gauge* + +Requires libvips v8.15.3 + ### v0.33.5 - 16th August 2024 * Upgrade to libvips v8.15.3 for upstream bug fixes. diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 44e63f4ec..97ef71d1c 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.0.6" + "@img/sharp-libvips-darwin-arm64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index ce382363f..ec40a8453 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.0.6" + "@img/sharp-libvips-darwin-x64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index 241c3bc61..4df197fd8 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.0.6" + "@img/sharp-libvips-linux-arm": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index 47a49e5dc..47547d4dc 100644 --- a/npm/linux-arm64/package.json +++ b/npm/linux-arm64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.0.6" + "@img/sharp-libvips-linux-arm64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json index 52622ae38..07a38f1cd 100644 --- a/npm/linux-ppc64/package.json +++ b/npm/linux-ppc64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.0.6" + "@img/sharp-libvips-linux-ppc64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index 1abf2d070..fa302a82c 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.0.6" + "@img/sharp-libvips-linux-s390x": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index 8ef186ea2..8b09cc1f4 100644 --- a/npm/linux-x64/package.json +++ b/npm/linux-x64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.0.6" + "@img/sharp-libvips-linux-x64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index 4cf3ee540..21ec0a3a7 100644 --- a/npm/linuxmusl-arm64/package.json +++ b/npm/linuxmusl-arm64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.0.6" + "@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index b065354cd..39b89dec5 100644 --- a/npm/linuxmusl-x64/package.json +++ b/npm/linuxmusl-x64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.0.6" + "@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc1" }, "files": [ "lib" diff --git a/package.json b/package.json index faf9a0c27..cd166c5dd 100644 --- a/package.json +++ b/package.json @@ -144,15 +144,15 @@ "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.5", "@img/sharp-darwin-x64": "0.33.5", - "@img/sharp-libvips-darwin-arm64": "1.0.6", - "@img/sharp-libvips-darwin-x64": "1.0.6", - "@img/sharp-libvips-linux-arm": "1.0.6", - "@img/sharp-libvips-linux-arm64": "1.0.6", - "@img/sharp-libvips-linux-ppc64": "1.0.6", - "@img/sharp-libvips-linux-s390x": "1.0.6", - "@img/sharp-libvips-linux-x64": "1.0.6", - "@img/sharp-libvips-linuxmusl-arm64": "1.0.6", - "@img/sharp-libvips-linuxmusl-x64": "1.0.6", + "@img/sharp-libvips-darwin-arm64": "1.1.0-rc1", + "@img/sharp-libvips-darwin-x64": "1.1.0-rc1", + "@img/sharp-libvips-linux-arm": "1.1.0-rc1", + "@img/sharp-libvips-linux-arm64": "1.1.0-rc1", + "@img/sharp-libvips-linux-ppc64": "1.1.0-rc1", + "@img/sharp-libvips-linux-s390x": "1.1.0-rc1", + "@img/sharp-libvips-linux-x64": "1.1.0-rc1", + "@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc1", + "@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc1", "@img/sharp-linux-arm": "0.33.5", "@img/sharp-linux-arm64": "0.33.5", "@img/sharp-linux-s390x": "0.33.5", @@ -165,10 +165,10 @@ }, "devDependencies": { "@emnapi/runtime": "^1.2.0", - "@img/sharp-libvips-dev": "1.0.6", - "@img/sharp-libvips-dev-wasm32": "1.0.6", - "@img/sharp-libvips-win32-ia32": "1.0.6", - "@img/sharp-libvips-win32-x64": "1.0.6", + "@img/sharp-libvips-dev": "1.1.0-rc1", + "@img/sharp-libvips-dev-wasm32": "1.1.0-rc1", + "@img/sharp-libvips-win32-ia32": "1.1.0-rc1", + "@img/sharp-libvips-win32-x64": "1.1.0-rc1", "@types/node": "*", "cc": "^3.0.1", "emnapi": "^1.2.0", @@ -190,7 +190,7 @@ "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "config": { - "libvips": ">=8.15.5" + "libvips": ">=8.16.0" }, "funding": { "url": "https://opencollective.com/libvips" diff --git a/src/binding.gyp b/src/binding.gyp index e8eb23cdf..4b4daefea 100644 --- a/src/binding.gyp +++ b/src/binding.gyp @@ -18,7 +18,7 @@ # Build libvips C++ binding for Windows due to MSVC std library ABI changes 'type': 'shared_library', 'defines': [ - 'VIPS_CPLUSPLUS_EXPORTS', + '_VIPS_PUBLIC=__declspec(dllexport)', '_ALLOW_KEYWORD_MACROS' ], 'sources': [ diff --git a/src/common.h b/src/common.h index 2f983d9db..f079de1e0 100644 --- a/src/common.h +++ b/src/common.h @@ -15,9 +15,9 @@ // Verify platform and compiler compatibility #if (VIPS_MAJOR_VERSION < 8) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 15) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 15 && VIPS_MICRO_VERSION < 5) -#error "libvips version 8.15.5+ is required - please see https://sharp.pixelplumbing.com/install" + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 16) || \ + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 16 && VIPS_MICRO_VERSION < 0) +#error "libvips version 8.16.0+ is required - please see https://sharp.pixelplumbing.com/install" #endif #if ((!defined(__clang__)) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6))) diff --git a/test/fixtures/expected/gravity-center-width.webp b/test/fixtures/expected/gravity-center-width.webp index e885bb415..964ebe61f 100644 Binary files a/test/fixtures/expected/gravity-center-width.webp and b/test/fixtures/expected/gravity-center-width.webp differ diff --git a/test/fixtures/expected/tint-blue.jpg b/test/fixtures/expected/tint-blue.jpg index aad140d9b..780ffef52 100644 Binary files a/test/fixtures/expected/tint-blue.jpg and b/test/fixtures/expected/tint-blue.jpg differ diff --git a/test/fixtures/expected/tint-cmyk.jpg b/test/fixtures/expected/tint-cmyk.jpg index 5c2c67a41..1bd076da5 100644 Binary files a/test/fixtures/expected/tint-cmyk.jpg and b/test/fixtures/expected/tint-cmyk.jpg differ diff --git a/test/fixtures/expected/tint-green.jpg b/test/fixtures/expected/tint-green.jpg index 4facab687..c7ef22bef 100644 Binary files a/test/fixtures/expected/tint-green.jpg and b/test/fixtures/expected/tint-green.jpg differ diff --git a/test/fixtures/expected/tint-red.jpg b/test/fixtures/expected/tint-red.jpg index a719c706c..b0fdc44c7 100644 Binary files a/test/fixtures/expected/tint-red.jpg and b/test/fixtures/expected/tint-red.jpg differ diff --git a/test/fixtures/expected/tint-sepia.jpg b/test/fixtures/expected/tint-sepia.jpg index b2ea936d4..57fae97bb 100644 Binary files a/test/fixtures/expected/tint-sepia.jpg and b/test/fixtures/expected/tint-sepia.jpg differ diff --git a/test/fixtures/expected/webp-alpha-80.webp b/test/fixtures/expected/webp-alpha-80.webp index 739d8c00e..cb4ef6ec4 100644 Binary files a/test/fixtures/expected/webp-alpha-80.webp and b/test/fixtures/expected/webp-alpha-80.webp differ diff --git a/test/unit/libvips.js b/test/unit/libvips.js index 0a6f79320..5578ff42a 100644 --- a/test/unit/libvips.js +++ b/test/unit/libvips.js @@ -179,7 +179,7 @@ describe('libvips binaries', function () { process.env.npm_config_arch = 's390x'; process.env.npm_config_libc = ''; const locatorHash = libvips.yarnLocator(); - assert.strictEqual(locatorHash, 'b9c917c310'); + assert.strictEqual(locatorHash, '9b2ea457de'); delete process.env.npm_config_platform; delete process.env.npm_config_arch; delete process.env.npm_config_libc; diff --git a/test/unit/normalize.js b/test/unit/normalize.js index 95df85786..d9e62d826 100644 --- a/test/unit/normalize.js +++ b/test/unit/normalize.js @@ -15,8 +15,8 @@ const assertNormalized = function (data) { min = Math.min(min, data[i]); max = Math.max(max, data[i]); } - assert.strictEqual(0, min); - assert.ok([254, 255].includes(max)); + assert.strictEqual(0, min, 'min too high'); + assert.ok(max > 248, 'max too low'); }; describe('Normalization', function () { diff --git a/test/unit/stats.js b/test/unit/stats.js index 22895ac87..487e37dd4 100644 --- a/test/unit/stats.js +++ b/test/unit/stats.js @@ -27,7 +27,7 @@ describe('Image Stats', function () { if (err) throw err; assert.strictEqual(true, stats.isOpaque); - assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541)); + assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659)); assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.7883011147075762)); const { r, g, b } = stats.dominant; @@ -272,7 +272,7 @@ describe('Image Stats', function () { assert.strictEqual(true, stats.isOpaque); assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.51758075132966)); - assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 9.959951636662941)); + assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 9.971384105278734)); const { r, g, b } = stats.dominant; assert.strictEqual(40, r); @@ -336,8 +336,8 @@ describe('Image Stats', function () { if (err) throw err; assert.strictEqual(true, stats.isOpaque); - assert.strictEqual(true, isInAcceptableRange(stats.entropy, 6.087309412541799)); - assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 2.9250574456255682)); + assert.strictEqual(true, isInAcceptableRange(stats.entropy, 6.08118048729375)); + assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 2.936767879098001)); const { r, g, b } = stats.dominant; assert.strictEqual(120, r); @@ -484,7 +484,7 @@ describe('Image Stats', function () { if (err) throw err; assert.strictEqual(true, stats.isOpaque); - assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541)); + assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659)); assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.788301114707569)); const { r, g, b } = stats.dominant; @@ -552,7 +552,7 @@ describe('Image Stats', function () { return pipeline.stats().then(function (stats) { assert.strictEqual(true, stats.isOpaque); - assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541)); + assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659)); assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.788301114707569)); const { r, g, b } = stats.dominant; @@ -615,7 +615,7 @@ describe('Image Stats', function () { it('File in, Promise out', function () { return sharp(fixtures.inputJpg).stats().then(function (stats) { assert.strictEqual(true, stats.isOpaque); - assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541)); + assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659)); assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.788301114707569)); const { r, g, b } = stats.dominant; @@ -682,8 +682,8 @@ describe('Image Stats', function () { return Promise .all([original, blurred]) .then(([original, blurred]) => { - assert.strictEqual(true, isInAcceptableRange(original.sharpness, 0.7883011147075476)); - assert.strictEqual(true, isInAcceptableRange(blurred.sharpness, 0.4791559805997398)); + assert.strictEqual(true, isInAcceptableRange(original.sharpness, 0.789046400439488)); + assert.strictEqual(true, isInAcceptableRange(blurred.sharpness, 0.47985138441709047)); }); });