Skip to content

Commit

Permalink
Ensure sharp.format.heif is AVIF-only for prebuilt binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Jun 19, 2024
1 parent 9c05ea8 commit ae06f46
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Requires libvips v8.15.2
[#4111](https://github.com/lovell/sharp/pull/4111)
[@project0](https://github.com/project0)

* Ensure `sharp.format.heif` includes only AVIF when using prebuilt binaries.
[#4132](https://github.com/lovell/sharp/issues/4132)

### v0.33.4 - 16th May 2024

* Remove experimental status from `pipelineColourspace`.
Expand Down
7 changes: 7 additions & 0 deletions lib/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ if (!libvipsVersion.isGlobal) {
}
versions.sharp = require('../package.json').version;

/* istanbul ignore next */
if (versions.heif && format.heif) {
// Prebuilt binaries provide AV1
format.heif.input.fileSuffix = ['.avif'];
format.heif.output.alias = ['avif'];
}

/**
* Gets or, when options are provided, sets the limits of _libvips'_ operation cache.
* Existing entries in the cache will be trimmed after any change in limits.
Expand Down

0 comments on commit ae06f46

Please sign in to comment.