mirror of
https://github.com/lovell/sharp.git
synced 2025-07-21 07:42:27 +02:00
Compare commits
2 Commits
e75ae970ed
...
63b0a11b5b
Author | SHA1 | Date | |
---|---|---|---|
|
63b0a11b5b | ||
|
c4d6aec48c |
@ -626,6 +626,9 @@ Use these AVIF options for output image.
|
|||||||
AVIF image sequences are not supported.
|
AVIF image sequences are not supported.
|
||||||
Prebuilt binaries support a bitdepth of 8 only.
|
Prebuilt binaries support a bitdepth of 8 only.
|
||||||
|
|
||||||
|
This feature is experimental on the Windows ARM64 platform
|
||||||
|
and requires a CPU with ARM64v8.4 or later.
|
||||||
|
|
||||||
|
|
||||||
**Throws**:
|
**Throws**:
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ Requires libvips v8.16.1
|
|||||||
[#4207](https://github.com/lovell/sharp/pull/4207)
|
[#4207](https://github.com/lovell/sharp/pull/4207)
|
||||||
[#4398](https://github.com/lovell/sharp/issues/4398)
|
[#4398](https://github.com/lovell/sharp/issues/4398)
|
||||||
|
|
||||||
* Add support for prebuilt Windows ARM64 binaries.
|
* Add experimental support for prebuilt Windows ARM64 binaries.
|
||||||
[#4375](https://github.com/lovell/sharp/pull/4375)
|
[#4375](https://github.com/lovell/sharp/pull/4375)
|
||||||
[@hans00](https://github.com/hans00)
|
[@hans00](https://github.com/hans00)
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ Ready-compiled sharp and libvips binaries are provided for use on the most commo
|
|||||||
* Linux x64 (glibc >= 2.26, musl >= 1.2.2, CPU with SSE4.2)
|
* Linux x64 (glibc >= 2.26, musl >= 1.2.2, CPU with SSE4.2)
|
||||||
* Windows x64
|
* Windows x64
|
||||||
* Windows x86
|
* Windows x86
|
||||||
* Windows ARM64
|
* Windows ARM64 (experimental, CPU with ARMv8.4 required for all features)
|
||||||
|
|
||||||
This provides support for the
|
This provides support for the
|
||||||
JPEG, PNG, WebP, AVIF (limited to 8-bit depth), TIFF, GIF and SVG (input) image formats.
|
JPEG, PNG, WebP, AVIF (limited to 8-bit depth), TIFF, GIF and SVG (input) image formats.
|
||||||
|
@ -1019,6 +1019,9 @@ function tiff (options) {
|
|||||||
* AVIF image sequences are not supported.
|
* AVIF image sequences are not supported.
|
||||||
* Prebuilt binaries support a bitdepth of 8 only.
|
* Prebuilt binaries support a bitdepth of 8 only.
|
||||||
*
|
*
|
||||||
|
* This feature is experimental on the Windows ARM64 platform
|
||||||
|
* and requires a CPU with ARM64v8.4 or later.
|
||||||
|
*
|
||||||
* @example
|
* @example
|
||||||
* const data = await sharp(input)
|
* const data = await sharp(input)
|
||||||
* .avif({ effort: 2 })
|
* .avif({ effort: 2 })
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
"icc": "^3.0.0",
|
"icc": "^3.0.0",
|
||||||
"jsdoc-to-markdown": "^9.1.1",
|
"jsdoc-to-markdown": "^9.1.1",
|
||||||
"license-checker": "^25.0.1",
|
"license-checker": "^25.0.1",
|
||||||
"mocha": "^11.2.2",
|
"mocha": "^11.4.0",
|
||||||
"node-addon-api": "^8.3.1",
|
"node-addon-api": "^8.3.1",
|
||||||
"nyc": "^17.1.0",
|
"nyc": "^17.1.0",
|
||||||
"prebuild": "^13.0.1",
|
"prebuild": "^13.0.1",
|
||||||
|
@ -10,18 +10,20 @@ const sharp = require('../../');
|
|||||||
describe('Utilities', function () {
|
describe('Utilities', function () {
|
||||||
describe('Cache', function () {
|
describe('Cache', function () {
|
||||||
it('Can be disabled', function (done) {
|
it('Can be disabled', function (done) {
|
||||||
queueMicrotask(() => {
|
const check = setInterval(() => {
|
||||||
sharp.cache(false);
|
|
||||||
const cache = sharp.cache(false);
|
const cache = sharp.cache(false);
|
||||||
assert.strictEqual(cache.memory.current, 0);
|
const empty =
|
||||||
assert.strictEqual(cache.memory.max, 0);
|
cache.memory.current +
|
||||||
assert.strictEqual(typeof cache.memory.high, 'number');
|
cache.memory.max +
|
||||||
assert.strictEqual(cache.files.current, 0);
|
cache.files.current +
|
||||||
assert.strictEqual(cache.files.max, 0);
|
cache.files.max +
|
||||||
assert.strictEqual(cache.items.current, 0);
|
cache.items.current +
|
||||||
assert.strictEqual(cache.items.max, 0);
|
cache.items.max === 0;
|
||||||
|
if (empty) {
|
||||||
|
clearInterval(check);
|
||||||
done();
|
done();
|
||||||
});
|
}
|
||||||
|
}, 2000);
|
||||||
});
|
});
|
||||||
it('Can be enabled with defaults', function () {
|
it('Can be enabled with defaults', function () {
|
||||||
const cache = sharp.cache(true);
|
const cache = sharp.cache(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user