版本发布 8
* Breaking: Drop support for Node.js 18, now requires Node.js >= 20.9.0. * Breaking: Remove `install` script from `package.json` file. Compiling from source is now opt-in via the `build` script. * Breaking: Lossy AVIF output is now tuned using SSIMULACRA2-based `iq` quality metrics. * Breaking: Add `limitInputChannels` with a default value of 5. * Breaking: Remove deprecated `failOnError` constructor property. * Breaking: Remove deprecated `paletteBitDepth` from `metadata` response. * Breaking: Remove deprecated properties from `sharpen` operation. * Breaking: Rename `format.jp2k` as `format.jp2` for API consistency. * Upgrade to libvips v8.18.3 for upstream bug fixes. * Remove experimental status from WebAssembly binaries. * Add prebuilt binaries for FreeBSD (WebAssembly). * Deprecate Windows 32-bit (win32-ia32) prebuilt binaries. * Ensure TIFF output `bitdepth` option is limited to 1, 2 or 4. * Add AVIF/HEIF `tune` option for control over quality metrics. [#4227](https://github.com/lovell/sharp/issues/4227) * Add `keepGainMap` and `withGainMap` to process HDR JPEG images with embedded gain maps. [#4314](https://github.com/lovell/sharp/issues/4314) * Add `toUint8Array` for output image as a `TypedArray` backed by a transferable `ArrayBuffer`. [#4355](https://github.com/lovell/sharp/issues/4355) * Require prebuilt binaries using static paths to aid code bundling. [#4380](https://github.com/lovell/sharp/issues/4380) * TypeScript: Ensure `FormatEnum` keys match reality. [#4475](https://github.com/lovell/sharp/issues/4475) * Add `margin` option to `trim` operation. [#4480](https://github.com/lovell/sharp/issues/4480) [@eddienubes](https://github.com/eddienubes) * Ensure HEIF primary item is used as default page/frame. [#4487](https://github.com/lovell/sharp/issues/4487) * Add image Media Type (MIME Type) to metadata response. [#4492](https://github.com/lovell/sharp/issues/4492) * Add `withDensity` to set output density in EXIF metadata. [#4496](https://github.com/lovell/sharp/issues/4496) * Improve `pkg-config` path discovery. [#4504](https://github.com/lovell/sharp/issues/4504) * Add WebP `exact` option for control over transparent pixel colour values. * Add support for ECMAScript Modules (ESM). [#4509](https://github.com/lovell/sharp/pull/4509) [@florian-lefebvre](https://github.com/florian-lefebvre)
* Breaking: Drop support for Node.js 18, now requires Node.js >= 20.9.0. * Breaking: Remove `install` script from `package.json` file. Compiling from source is now opt-in via the `build` script. * Breaking: AVIF output is now tuned using SSIMULACRA2-based `iq` quality metrics rather than `ssim`. * Breaking: Remove deprecated `failOnError` constructor property. * Breaking: Remove deprecated `paletteBitDepth` from `metadata` response. * Breaking: Remove deprecated properties from `sharpen` operation. * Breaking: Rename `format.jp2k` as `format.jp2` for API consistency. * Upgrade to libvips v8.18.2 for upstream bug fixes. * Remove experimental status from WebAssembly binaries. * Add prebuilt binaries for FreeBSD (WebAssembly). * Deprecate Windows 32-bit (win32-ia32) prebuilt binaries. * Ensure TIFF output `bitdepth` option is limited to 1, 2 or 4. * Add AVIF/HEIF `tune` option for control over quality metrics. [#4227](https://github.com/lovell/sharp/issues/4227) * Add `keepGainMap` and `withGainMap` to process HDR JPEG images with embedded gain maps. [#4314](https://github.com/lovell/sharp/issues/4314) * Add `toUint8Array` for output image as a `TypedArray` backed by a transferable `ArrayBuffer`. [#4355](https://github.com/lovell/sharp/issues/4355) * Require prebuilt binaries using static paths to aid code bundling. [#4380](https://github.com/lovell/sharp/issues/4380) * TypeScript: Ensure `FormatEnum` keys match reality. [#4475](https://github.com/lovell/sharp/issues/4475) * Add `margin` option to `trim` operation. [#4480](https://github.com/lovell/sharp/issues/4480) [@eddienubes](https://github.com/eddienubes) * Ensure HEIF primary item is used as default page/frame. [#4487](https://github.com/lovell/sharp/issues/4487) * Add image Media Type (MIME Type) to metadata response. [#4492](https://github.com/lovell/sharp/issues/4492) * Add `withDensity` to set output density in EXIF metadata. [#4496](https://github.com/lovell/sharp/issues/4496) * Improve `pkg-config` path discovery. [#4504](https://github.com/lovell/sharp/issues/4504) * Add WebP `exact` option for control over transparent pixel colour values. * Add support for ESM [#4509](https://github.com/lovell/sharp/pull/4509) [@florian-lefebvre](https://github.com/florian-lefebvre)
* Breaking: Drop support for Node.js 18, now requires Node.js >= 20.9.0. * Breaking: Remove `install` script from `package.json` file. Compiling from source is now opt-in via the `build` script. * Breaking: AVIF output is now tuned using SSIMULACRA2-based `iq` quality metrics rather than `ssim`. * Breaking: Remove deprecated `failOnError` constructor property. * Breaking: Remove deprecated `paletteBitDepth` from `metadata` response. * Breaking: Remove deprecated properties from `sharpen` operation. * Breaking: Rename `format.jp2k` as `format.jp2` for API consistency. * Upgrade to libvips v8.18.2 for upstream bug fixes. * Remove experimental status from WebAssembly binaries. * Add prebuilt binaries for FreeBSD (WebAssembly). * Deprecate Windows 32-bit (win32-ia32) prebuilt binaries. * Ensure TIFF output `bitdepth` option is limited to 1, 2 or 4. * Add AVIF/HEIF `tune` option for control over quality metrics. [#4227](https://github.com/lovell/sharp/issues/4227) * Add `keepGainMap` and `withGainMap` to process HDR JPEG images with embedded gain maps. [#4314](https://github.com/lovell/sharp/issues/4314) * Add `toUint8Array` for output image as a `TypedArray` backed by a transferable `ArrayBuffer`. [#4355](https://github.com/lovell/sharp/issues/4355) * Require prebuilt binaries using static paths to aid code bundling. [#4380](https://github.com/lovell/sharp/issues/4380) * TypeScript: Ensure `FormatEnum` keys match reality. [#4475](https://github.com/lovell/sharp/issues/4475) * Add `margin` option to `trim` operation. [#4480](https://github.com/lovell/sharp/issues/4480) [@eddienubes](https://github.com/eddienubes) * Ensure HEIF primary item is used as default page/frame. [#4487](https://github.com/lovell/sharp/issues/4487) * Add image Media Type (MIME Type) to metadata response. [#4492](https://github.com/lovell/sharp/issues/4492) * Add `withDensity` to set output density in EXIF metadata. [#4496](https://github.com/lovell/sharp/issues/4496) * Improve `pkg-config` path discovery. [#4504](https://github.com/lovell/sharp/issues/4504) * Add WebP `exact` option for control over transparent pixel colour values. * Add support for ESM [#4509](https://github.com/lovell/sharp/pull/4509) [@florian-lefebvre](https://github.com/florian-lefebvre)
* Breaking: Drop support for Node.js 18, now requires Node.js >= 20.9.0. * Breaking: Remove `install` script from `package.json` file. Compiling from source is now opt-in via the `build` script. * Breaking: AVIF output is now tuned using SSIMULACRA2-based `iq` quality metrics rather than `ssim`. * Breaking: Remove deprecated `failOnError` constructor property. * Breaking: Remove deprecated `paletteBitDepth` from `metadata` response. * Breaking: Remove deprecated properties from `sharpen` operation. * Breaking: Rename `format.jp2k` as `format.jp2` for API consistency. * Upgrade to libvips v8.18.0 for upstream bug fixes. * Deprecate Windows 32-bit (win32-ia32) prebuilt binaries. * Add AVIF/HEIF `tune` option for control over quality metrics. [#4227](https://github.com/lovell/sharp/issues/4227) * Add `withGainMap` to process HDR JPEG images with embedded gain maps. [#4314](https://github.com/lovell/sharp/issues/4314) * Add `toUint8Array` for output image as a `TypedArray` backed by a transferable `ArrayBuffer`. [#4355](https://github.com/lovell/sharp/issues/4355) * TypeScript: Ensure `FormatEnum` keys match reality. [#4475](https://github.com/lovell/sharp/issues/4475) * Add `margin` option to `trim` operation. [#4480](https://github.com/lovell/sharp/issues/4480) [@eddienubes](https://github.com/eddienubes) * Add WebP `exact` option for control over transparent pixel colour values.
* Upgrade to libvips v8.17.3 for upstream bug fixes. * Add experimental support for prebuilt Linux RISC-V 64-bit binaries. * Support building from source with npm v12+, deprecate `--build-from-source` flag. [#4458](https://github.com/lovell/sharp/issues/4458) * Add support for BigTIFF output. [#4459](https://github.com/lovell/sharp/pull/4459) [@throwbi](https://github.com/throwbi) * Improve error messaging when only warnings issued. [#4465](https://github.com/lovell/sharp/issues/4465) * Simplify ICC processing when retaining input profiles. [#4468](https://github.com/lovell/sharp/issues/4468)
* Upgrade to libvips v8.17.2 for upstream bug fixes. * Ensure TIFF `subifd` and OpenSlide `level` input options are respected (regression in 0.34.3). * Ensure `autoOrient` occurs before non-90 angle rotation. [#4425](https://github.com/lovell/sharp/issues/4425) * Ensure `autoOrient` removes existing metadata after shrink-on-load. [#4431](https://github.com/lovell/sharp/issues/4431) * TypeScript: Ensure `KernelEnum` includes `linear`. [#4441](https://github.com/lovell/sharp/pull/4441) [@BayanBennett](https://github.com/BayanBennett) * Ensure `unlimited` flag is passed upstream when reading TIFF images. [#4446](https://github.com/lovell/sharp/issues/4446) * Support Electron memory cage when reading XMP metadata (regression in 0.34.3). [#4451](https://github.com/lovell/sharp/issues/4451) * Add sharp-libvips rpath for yarn v5 support. [#4452](https://github.com/lovell/sharp/pull/4452) [@arcanis](https://github.com/arcanis)
--- title: v0.34.4 - TBD slug: changelog/v0.34.4 --- * Ensure `autoOrient` occurs before non-90 angle rotation. [#4425](https://github.com/lovell/sharp/issues/4425) * Ensure `autoOrient` removes existing metadata after shrink-on-load. [#4431](https://github.com/lovell/sharp/issues/4431)