mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Simplify ICC processing when retaining input profiles #4468
Takes advantage of libvips' improved ICC handling
This commit is contained in:
@@ -201,7 +201,7 @@ const dataWithMergedExif = await sharp(inputWithExif)
|
||||
|
||||
Keep ICC profile from the input image in the output image.
|
||||
|
||||
For non-RGB output use [toColourspace](/api-colour/#tocolourspace).
|
||||
When input and output colour spaces differ, use with [toColourspace](/api-colour/#tocolourspace) and optionally [pipelineColourspace](/api-colour/#pipelinecolourspace).
|
||||
|
||||
|
||||
**Since**: 0.33.0
|
||||
@@ -211,6 +211,14 @@ const outputWithIccProfile = await sharp(inputWithIccProfile)
|
||||
.keepIccProfile()
|
||||
.toBuffer();
|
||||
```
|
||||
**Example**
|
||||
```js
|
||||
const cmykOutputWithIccProfile = await sharp(cmykInputWithIccProfile)
|
||||
.pipelineColourspace('cmyk')
|
||||
.toColourspace('cmyk')
|
||||
.keepIccProfile()
|
||||
.toBuffer();
|
||||
```
|
||||
|
||||
|
||||
## withIccProfile
|
||||
|
||||
@@ -16,3 +16,6 @@ slug: changelog/v0.34.5
|
||||
|
||||
* 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)
|
||||
|
||||
Reference in New Issue
Block a user