Skip to content

Commit

Permalink
Ensure keepIccProfile retains P3 input profiles #4008
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Feb 26, 2024
1 parent debdacb commit 75fedf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/changelog.md
Expand Up @@ -6,8 +6,9 @@ Requires libvips v8.15.1

### v0.33.3 - TBD

* Ensure `keepIccProfile` retains CMYK input profiles.
* Ensure `keepIccProfile` retains P3 and CMYK input profiles.
[#3906](https://github.com/lovell/sharp/issues/3906)
[#4008](https://github.com/lovell/sharp/issues/4008)

### v0.33.2 - 12th January 2024

Expand Down
2 changes: 1 addition & 1 deletion src/pipeline.cc
Expand Up @@ -778,7 +778,7 @@ class PipelineWorker : public Napi::AsyncWorker {
// Transform colours from embedded profile to output profile
if ((baton->keepMetadata & VIPS_FOREIGN_KEEP_ICC) && baton->colourspaceInput != VIPS_INTERPRETATION_CMYK &&
baton->withIccProfile.empty() && sharp::HasProfile(image)) {
image = image.icc_transform("srgb", VImage::option()
image = image.icc_transform(processingProfile, VImage::option()
->set("embedded", TRUE)
->set("depth", sharp::Is16Bit(image.interpretation()) ? 16 : 8)
->set("intent", VIPS_INTENT_PERCEPTUAL));
Expand Down

0 comments on commit 75fedf1

Please sign in to comment.