diff --git a/.prebuildrc b/.prebuildrc index 0d95c2ed..0a4ccd2e 100644 --- a/.prebuildrc +++ b/.prebuildrc @@ -1,6 +1,6 @@ { "runtime": "napi", - "include-regex": "(sharp-.+\\.node|libvips-.+\\.dll|libglib-.+\\.dll|libgobject-.+\\.dll)", + "include-regex": "(sharp-.+\\.node|libvips-.+\\.dll)", "prerelease": true, "strip": true } diff --git a/docs/changelog.md b/docs/changelog.md index c37418de..890fd344 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,7 +2,7 @@ ## v0.33 - *gauge* -Requires libvips v8.14.5 +Requires libvips v8.15.0 ### v0.33.0 - TBD diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index da8a70bb..9438a113 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": "0.0.1" + "@img/sharp-libvips-darwin-arm64": "0.0.3" }, "files": [ "lib" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 03aa218e..01f04d0b 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": "0.0.1" + "@img/sharp-libvips-darwin-x64": "0.0.3" }, "files": [ "lib" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index 68c4ed07..155e41db 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": "0.0.1" + "@img/sharp-libvips-linux-arm": "0.0.3" }, "files": [ "lib" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index dada251c..5b231cac 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": "0.0.1" + "@img/sharp-libvips-linux-arm64": "0.0.3" }, "files": [ "lib" diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index 2e79c3ff..a11160e6 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": "0.0.2" + "@img/sharp-libvips-linux-s390x": "0.0.3" }, "files": [ "lib" diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index e66b555c..9f0486a2 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": "0.0.1" + "@img/sharp-libvips-linux-x64": "0.0.3" }, "files": [ "lib" diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index 15890c68..0e7482bf 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": "0.0.1" + "@img/sharp-libvips-linuxmusl-arm64": "0.0.3" }, "files": [ "lib" diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 556d8bb7..a9bf7e92 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": "0.0.1" + "@img/sharp-libvips-linuxmusl-x64": "0.0.3" }, "files": [ "lib" diff --git a/package.json b/package.json index 05d24f8b..9b7281f3 100644 --- a/package.json +++ b/package.json @@ -142,14 +142,14 @@ "optionalDependencies": { "@img/sharp-darwin-arm64": "0.33.0-alpha.9", "@img/sharp-darwin-x64": "0.33.0-alpha.9", - "@img/sharp-libvips-darwin-arm64": "0.0.1", - "@img/sharp-libvips-darwin-x64": "0.0.1", - "@img/sharp-libvips-linux-arm": "0.0.1", - "@img/sharp-libvips-linux-arm64": "0.0.1", - "@img/sharp-libvips-linux-s390x": "0.0.2", - "@img/sharp-libvips-linux-x64": "0.0.1", - "@img/sharp-libvips-linuxmusl-arm64": "0.0.1", - "@img/sharp-libvips-linuxmusl-x64": "0.0.1", + "@img/sharp-libvips-darwin-arm64": "0.0.3", + "@img/sharp-libvips-darwin-x64": "0.0.3", + "@img/sharp-libvips-linux-arm": "0.0.3", + "@img/sharp-libvips-linux-arm64": "0.0.3", + "@img/sharp-libvips-linux-s390x": "0.0.3", + "@img/sharp-libvips-linux-x64": "0.0.3", + "@img/sharp-libvips-linuxmusl-arm64": "0.0.3", + "@img/sharp-libvips-linuxmusl-x64": "0.0.3", "@img/sharp-linux-arm": "0.33.0-alpha.9", "@img/sharp-linux-arm64": "0.33.0-alpha.9", "@img/sharp-linux-s390x": "0.33.0-alpha.9", @@ -160,9 +160,9 @@ "@img/sharp-win32-x64": "0.33.0-alpha.9" }, "devDependencies": { - "@img/sharp-libvips-dev": "0.0.1", - "@img/sharp-libvips-win32-ia32": "0.0.1", - "@img/sharp-libvips-win32-x64": "0.0.1", + "@img/sharp-libvips-dev": "0.0.3", + "@img/sharp-libvips-win32-ia32": "0.0.3", + "@img/sharp-libvips-win32-x64": "0.0.3", "@types/node": "*", "async": "^3.2.4", "cc": "^3.0.1", @@ -182,7 +182,7 @@ "license": "Apache-2.0", "engines": { "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "libvips": ">=8.14.5" + "libvips": ">=8.15.0" }, "funding": { "url": "https://opencollective.com/libvips" diff --git a/src/binding.gyp b/src/binding.gyp index 0afc2b14..b616a02b 100644 --- a/src/binding.gyp +++ b/src/binding.gyp @@ -33,11 +33,11 @@ '<(sharp_libvips_lib_dir)/glib-2.0/include' ], 'link_settings': { - 'library_dirs': ['<(sharp_libvips_lib_dir)'], + 'library_dirs': [ + '<(sharp_libvips_lib_dir)' + ], 'libraries': [ - 'libvips.lib', - 'libglib-2.0.lib', - 'libgobject-2.0.lib' + 'libvips.lib' ], }, 'configurations': { @@ -141,9 +141,7 @@ ], 'link_settings': { 'libraries': [ - 'libvips.lib', - 'libglib-2.0.lib', - 'libgobject-2.0.lib' + 'libvips.lib' ] } }], @@ -255,9 +253,7 @@ 'copies': [{ 'destination': 'build/Release', 'files': [ - '<(sharp_libvips_lib_dir)/libvips-42.dll', - '<(sharp_libvips_lib_dir)/libglib-2.0-0.dll', - '<(sharp_libvips_lib_dir)/libgobject-2.0-0.dll' + '<(sharp_libvips_lib_dir)/libvips-42.dll' ] }] }] diff --git a/src/common.h b/src/common.h index f4a59c58..e7d9e0d5 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 < 14) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 14 && VIPS_MICRO_VERSION < 5) -#error "libvips version 8.14.5+ is required - please see https://sharp.pixelplumbing.com/install" + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 15) || \ + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 15 && VIPS_MICRO_VERSION < 0) +#error "libvips version 8.15.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/src/operations.cc b/src/operations.cc index 6fbe9906..3c95dac5 100644 --- a/src/operations.cc +++ b/src/operations.cc @@ -141,7 +141,7 @@ namespace sharp { return image.conv(blur); } else { // Slower, accurate Gaussian blur - return image.gaussblur(sigma); + return StaySequential(image, VIPS_ACCESS_SEQUENTIAL).gaussblur(sigma); } } diff --git a/src/pipeline.cc b/src/pipeline.cc index 54c4b940..ccc74fc3 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -485,9 +485,7 @@ class PipelineWorker : public Napi::AsyncWorker { image = sharp::StaySequential(image, access); image = image.smartcrop(baton->width, baton->height, VImage::option() ->set("interesting", baton->position == 16 ? VIPS_INTERESTING_ENTROPY : VIPS_INTERESTING_ATTENTION) -#if (VIPS_MAJOR_VERSION >= 8 && VIPS_MINOR_VERSION >= 15) ->set("premultiplied", shouldPremultiplyAlpha) -#endif ->set("attention_x", &attention_x) ->set("attention_y", &attention_y)); baton->hasCropOffset = true; diff --git a/test/unit/tile.js b/test/unit/tile.js index a70d16a6..8ff2eacc 100644 --- a/test/unit/tile.js +++ b/test/unit/tile.js @@ -741,28 +741,6 @@ describe('Tile', function () { }); }); - it('Google layout with depth onepixel', function (done) { - const directory = fixtures.path('output.google_depth_onepixel.dzi'); - fs.rm(directory, { recursive: true }, function () { - sharp(fixtures.inputJpg) - .tile({ - layout: 'google', - depth: 'onepixel', - size: 256 - }) - .toFile(directory, function (err, info) { - if (err) throw err; - assert.strictEqual('dz', info.format); - assert.strictEqual(2725, info.width); - assert.strictEqual(2225, info.height); - assert.strictEqual(3, info.channels); - assert.strictEqual('number', typeof info.size); - - assertGoogleTiles(directory, 256, 13, done); - }); - }); - }); - it('Google layout with depth onetile', function (done) { const directory = fixtures.path('output.google_depth_onetile.dzi'); fs.rm(directory, { recursive: true }, function () { diff --git a/test/unit/timeout.js b/test/unit/timeout.js index c04d2411..b80ef263 100644 --- a/test/unit/timeout.js +++ b/test/unit/timeout.js @@ -11,7 +11,7 @@ const fixtures = require('../fixtures'); describe('Timeout', function () { it('Will timeout after 1s when performing slow blur operation', () => assert.rejects( () => sharp(fixtures.inputJpg) - .blur(100) + .blur(200) .timeout({ seconds: 1 }) .toBuffer(), /timeout: [0-9]+% complete/ diff --git a/test/unit/tint.js b/test/unit/tint.js index a7805946..4c5d6e01 100644 --- a/test/unit/tint.js +++ b/test/unit/tint.js @@ -49,7 +49,7 @@ describe('Tint', function () { }); it('tints rgb image with sepia tone', function (done) { - const output = fixtures.path('output.tint-sepia.jpg'); + const output = fixtures.path('output.tint-sepia-hex.jpg'); sharp(fixtures.inputJpg) .resize(320, 240, { fastShrinkOnLoad: false }) .tint('#704214') @@ -63,7 +63,7 @@ describe('Tint', function () { }); it('tints rgb image with sepia tone with rgb colour', function (done) { - const output = fixtures.path('output.tint-sepia.jpg'); + const output = fixtures.path('output.tint-sepia-rgb.jpg'); sharp(fixtures.inputJpg) .resize(320, 240, { fastShrinkOnLoad: false }) .tint([112, 66, 20])