diff --git a/docs/src/content/docs/changelog.md b/docs/src/content/docs/changelog.md index 9e30b970..67d222d6 100644 --- a/docs/src/content/docs/changelog.md +++ b/docs/src/content/docs/changelog.md @@ -49,6 +49,9 @@ Requires libvips v8.16.1 [#4316](https://github.com/lovell/sharp/pull/4316) [@florentzabera](https://github.com/florentzabera) +* Allow wide-gamut HEIF output at higher bitdepths. + [#4344](https://github.com/lovell/sharp/issues/4344) + ## v0.33 - *gauge* Requires libvips v8.15.3 diff --git a/src/pipeline.cc b/src/pipeline.cc index 770c2bbd..24ae7e02 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -1032,7 +1032,7 @@ class PipelineWorker : public Napi::AsyncWorker { (baton->formatOut == "input" && inputImageType == sharp::ImageType::HEIF)) { // Write HEIF to buffer sharp::AssertImageTypeDimensions(image, sharp::ImageType::HEIF); - image = sharp::RemoveAnimationProperties(image).cast(VIPS_FORMAT_UCHAR); + image = sharp::RemoveAnimationProperties(image); VipsArea *area = reinterpret_cast(image.heifsave_buffer(VImage::option() ->set("keep", baton->keepMetadata) ->set("Q", baton->heifQuality) @@ -1227,7 +1227,7 @@ class PipelineWorker : public Napi::AsyncWorker { (willMatchInput && inputImageType == sharp::ImageType::HEIF)) { // Write HEIF to file sharp::AssertImageTypeDimensions(image, sharp::ImageType::HEIF); - image = sharp::RemoveAnimationProperties(image).cast(VIPS_FORMAT_UCHAR); + image = sharp::RemoveAnimationProperties(image); image.heifsave(const_cast(baton->fileOut.data()), VImage::option() ->set("keep", baton->keepMetadata) ->set("Q", baton->heifQuality)