Using RenderingIntent embedded in the profile (varing intent
based on ICC metadata)
#3474
Replies: 5 comments 1 reply
-
Hi @paperboyo, That's interesting, I didn't realize pshop made and attached a custom profile. I don't think there's such a thing as a default rendering intent tag in a profile though, is there? For a typical profile, libvips sees eg.:
Is pshop making a custom profile with exactly one intent? In which case libvips may already do what you want -- if you ask for an intent that's not supported, it should default to the best available intent, which would be the one that's there (I think). Do you have a sample image that's been written with one of these profiles? |
Beta Was this translation helpful? Give feedback.
-
I tried with your profile and I see:
So it looks lie a pretty standard table profile with the usual four intents. |
Beta Was this translation helpful? Give feedback.
-
Hi, @jcupitt. Thanks so much for responding! I’m far from an expert, so I can only hypothesise (although I kinda know what outcome I want). I think
(emphasis mine; here – it was used, so the tag was modified accordingly). To check, I took those two images I attached above, extracted the profiles from them using ImageMagick and displayed them side-by-side in Colorsync Utility (I attach them here too). Notice how supported intents are the same (all AtoBs and BtoAs), but the “Rendering Intent” tag differs: I also attach the source RGB image used for Photoshop conversions. My ideal outcome is to turn both CMYK conversions attached in first post back to RGB and match this image as closely as possible (for that to happen, the intents used must match). Using one command. I’m currently struggling to use VIPS command line to make it display verbose output like in your snippets, but I don’t want this thread (which I hope has merit) to turn into a pre-school on command line. I will consult with my more knowledgable colleagues and come back with code examples. Currently, when I try one VIPS command on both files
I get different RGB results back. And the one from Perceptual looks off, so it must be using default Relative intent? |
Beta Was this translation helpful? Give feedback.
-
I made an enhancement issue for this feature: #3475 Thanks for the suggestion! |
Beta Was this translation helpful? Give feedback.
-
Thank you so much!
FWIW, I would make sure the name of the new
Oh, yes, definitely. Just checked IM and it doesn’t do what Photoshop does (modify this tag in profiles embedded in output images). Wondering if this is Adobe invention or IM’s omission or… Spec isn’t super-clear, to be honest. Maybe someone at lcms would know if this is something VIPS should do too? (but here I’m just trying to be a good citizen, huge majority of images I’m gonna deal with were/are converted by Photoshop). Thanks again. |
Beta Was this translation helpful? Give feedback.
-
Hello. Thank you so much for your work on VIPS!
Short version: is there a way for
vips_icc_transform
(andvips_icc_import
?) to useintent
present in the profile embedded in the source image instead of me having to declare it explicitly (or use defaultrelative
)?Problem:
relative
works well as a default rendering intent. We would like to use VIPS to perform conversions from any CMYK profile into RGB. Most CMYK images were created from RGB data usingrelative
rendering intent.But at least for one, very common, standard, CMYK profile, all conversions were performed and are still being performed using
perceptual
rendering intent (for a good reason).Conversions were performed using Adobe Photoshop. When Photoshop converts from RGB to CMYK and user embeds the output profile in an image, Photoshop writes that embedded CMYK profile with a rendering intent that was actually used for the conversion (6.1.11 Rendering Intent).
So:
perceptual
as its rendering intent.relative
as its rendering intent.As converting those images back to RGB must use the same rendering intent used to create them in the first place, I would like to be able to set
intent
forvips_icc_transform
to something likeicc_embedded
, so that theintent
would depend on the rendering intent specified inside the profile embedded inside the image in question and could differ per-image.I attach two images created from the same RGB data, converted to ISONewspaperv4 CMYK profile using perceptual and relative rendering intents.
For the image converted using Perceptual, exiftool reports:
[ICC_Profile] Rendering Intent: Perceptual
For the image converted using Relative, exiftool reports:
[ICC_Profile] Rendering Intent: Media-Relative Colorimetric
Photoshop RGBtoCMYK conversions using different Rendering Intents.zip
Is there a way for me to achieve this using VIPS alone? Can VIPS vary rendering intent based on ICC metadata? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions