mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Ignore sequentialRead option for stats #3462
This commit is contained in:
parent
01ffa80338
commit
a472aea025
@ -15,6 +15,9 @@ Requires libvips v8.13.3
|
|||||||
* Improve `extractChannel` support for 16-bit output colourspaces.
|
* Improve `extractChannel` support for 16-bit output colourspaces.
|
||||||
[#3453](https://github.com/lovell/sharp/issues/3453)
|
[#3453](https://github.com/lovell/sharp/issues/3453)
|
||||||
|
|
||||||
|
* Ignore `sequentialRead` option when calculating image statistics.
|
||||||
|
[#3462](https://github.com/lovell/sharp/issues/3462)
|
||||||
|
|
||||||
### v0.31.2 - 4th November 2022
|
### v0.31.2 - 4th November 2022
|
||||||
|
|
||||||
* Upgrade to libvips v8.13.3 for upstream bug fixes.
|
* Upgrade to libvips v8.13.3 for upstream bug fixes.
|
||||||
|
@ -176,6 +176,7 @@ Napi::Value stats(const Napi::CallbackInfo& info) {
|
|||||||
|
|
||||||
// Input
|
// Input
|
||||||
baton->input = sharp::CreateInputDescriptor(options.Get("input").As<Napi::Object>());
|
baton->input = sharp::CreateInputDescriptor(options.Get("input").As<Napi::Object>());
|
||||||
|
baton->input->access = VIPS_ACCESS_RANDOM;
|
||||||
|
|
||||||
// Function to notify of libvips warnings
|
// Function to notify of libvips warnings
|
||||||
Napi::Function debuglog = options.Get("debuglog").As<Napi::Function>();
|
Napi::Function debuglog = options.Get("debuglog").As<Napi::Function>();
|
||||||
|
@ -730,4 +730,9 @@ describe('Image Stats', function () {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('Sequential read option is ignored', async () => {
|
||||||
|
const { isOpaque } = await sharp(fixtures.inputJpg, { sequentialRead: true }).stats();
|
||||||
|
assert.strictEqual(isOpaque, true);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user