Upgrade to libvips 8.15.0-rc2

This commit is contained in:
Lovell Fuller 2023-11-04 09:22:58 +00:00
parent 7caaa8e22b
commit 2e7c60675b
18 changed files with 35 additions and 63 deletions

View File

@ -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
}

View File

@ -2,7 +2,7 @@
## v0.33 - *gauge*
Requires libvips v8.14.5
Requires libvips v8.15.0
### v0.33.0 - TBD

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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'
]
}]
}]

View File

@ -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)))

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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 () {

View File

@ -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/

View File

@ -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])