question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement: support custom (non sRGB) output ICC profiles and colourspaces

See original GitHub issue

This will convert pixel values using a provided ICC profile and attach that profile to the output image metadata.

It should assume the profile is RGB. If e.g. a CMYK profile is required, toColourspace must be used in addition.

Convert to and attach custom RGB output profile (proposed):

sharp(input)
  .withMetadata({ profile: '/path/to/rgb.icc' })
  ...

Convert to and attach existing RGB output profile (proposed):

sharp(rgbInput)
  .toColourspace('rgb')
  .withMetadata()
  ...

Convert to and attach custom CMYK output profile (proposed):

sharp(input)
  .toColourspace('cmyk')
  .withMetadata({ profile: '/path/to/cmyk.icc' })
  ...

Convert to and attach existing (or default if missing) CMYK output profile (proposed):

sharp(cmykInput)
  .toColourspace('cmyk')
  .withMetadata()
  ...

The icc_export, or icc_transform when no input profile, operation can be used for this.

The current existing behaviour, as in the following examples, will remain.

Convert to sRGB without embedded profile (existing behaviour):

sharp(input)
  ...

Convert to and attach existing sRGB output profile (existing behaviour):

sharp(input)
  .withMetadata()
  ...

See #1324 for custom input profile support.

See #218 for previous discussion on this and related features.

See #734 for a related enhancement that this might address.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:15
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
lovellcommented, Apr 29, 2019

Every issue tagged as an enhancement, such as this, represents a future possible enhancement; there is no “ETA”, “roadmap” or “timeline”.

On behalf of all sharp users I am always very grateful to anyone that helps implement such enhancements, either by using their own time to work on and submit a pull request or by offering to pay for my time to do likewise.

4reactions
randyridgecommented, Jan 21, 2019

Any movement on this? I’d simply like to replace the sRGB.icc with some Compact ICC Profiles in certain scenarios…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Color spaces - Capture One
Capture One Express can output to any RGB color space while Capture One Pro can also output to CMYK (it is necessary that...
Read more >
Use DirectX with Advanced Color on high/standard dynamic ...
This topic shows how to use DirectX with Advanced Color scenarios—including high dynamic range, wide color gamut with automatic system color ...
Read more >
ICC Profiles Explained - YouTube
This video is a recording of an hour long interactive online training class that talks all about ICC profiles and how to evaluate...
Read more >
Set up color management - Adobe Support
It removes any embedded profiles when opening images, and does not tag when saving. Always Optimize Colors For Computer Screens. Uses sRGB as ......
Read more >
All About ICC Profiles and Working Color Spaces (Podcast 577)
ICC profiles are used to translate the colors in our image to the ones reproducible by any given device or output media.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found