Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICC color profile - SVS aperio GT450 #11

Open
delta2golf opened this issue Sep 24, 2021 · 6 comments
Open

ICC color profile - SVS aperio GT450 #11

delta2golf opened this issue Sep 24, 2021 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@delta2golf
Copy link

Thank you again for the hard work on this.
There is a discrepancy between the colors of the images extracted and the optimal colors such as the one seen in Leica Imagescope. Are you able to incorporate ICC profile or other solution to address this color issue?
This issue is similar to what I described in this post.
Thank you so much!
https://forum.image.sc/t/color-discrepancy-qupath-x-imagescope-leica-gt450/57948/5

@delta2golf
Copy link
Author

openslide/openslide#139

@ap-- ap-- added enhancement New feature or request help wanted Extra attention is needed labels Sep 25, 2021
@ap--
Copy link
Collaborator

ap-- commented Sep 25, 2021

Hi @delta2golf,

interesting suggestion. I thought about this a bit and I think we could add this to tiffslide itself.
Getting the color profile seems super easy:

import io
from PIL.ImageCms import ImageCmsProfile
import tiffslide

t = tiffslide.TiffSlide("/path/to/your/image.svs")
try:
    icc_profile_bytes = t.ts_tifffile.pages[0].tags[34675].value
except KeyError:
    raise Exception("no icc profile stored in image")

icc_profile = ImageCmsProfile(io.BytesIO(icc_profile_bytes))

Then we'd need to build the output transform and apply it in-place to the returned PIL Images.

We'd need to test how much this slow's everything down. But we could emit a warning if the user wants to apply an icc profile.

Would you be interested in contributing this as a Pull Request? If yes, I can sketch out the interface and you could work on the implementation.

Cheers,
Andreas 😃

@tomvars
Copy link

tomvars commented Jun 27, 2022

Hi, is there any update on this? Also interested in this feature 👍

@ap--
Copy link
Collaborator

ap-- commented Jun 27, 2022

Hello @tomvars

I assume there has not been any progress on color profile support so far.
Contributions are always welcome ❤️
And as stated above, I'd be happy to provide some initial guidance on the implementation if needed.

Cheers,
Andreas 😃

@ap--
Copy link
Collaborator

ap-- commented Feb 13, 2024

ICC profiles are now available thanks to #83 @erikogabrielsson

Will be available in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants