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

QuickLook is not ICC aware (colors in media files are too much saturated and contrasty) #329

Closed
Sandros94 opened this issue Aug 28, 2018 · 31 comments

Comments

@Sandros94
Copy link

With the 0.3.5 version I cannot preview a jpeg image mostly because it has wrong color rendition, this is caused because QuickLook does not have any color management, reading the ICC from the monitor, reproducing inacurate colors.

The solution would be to read the ICC profile from the main monitor and use it as reference while loading the pictures and files that need it.

@xupefei
Copy link
Member

xupefei commented Aug 31, 2018

@Sandros94
Copy link
Author

No, still too much contrast. For what I can tell with this version that you linked (0.3.5-79g9530933) it looks like it's reading only a limited color range, (what in the video world would called a legal range) that is 16-235 in a 8bit format. Now I think that the color saturation is caused by the contrast increase caused by the limited color range.

@jeremyhart
Copy link

@Sandros94 Do you mind sharing the file you are testing please?

@Sandros94
Copy link
Author

Sandros94 commented Aug 31, 2018

Sure here they are, those a perfect examples. Keep in mind that if you want to check them with correct colors in Windows 10 you have to use either the old Windows Photo Viewer or download and check them with Adobe Bridge (if I remember right it's free), because the default Photo app in Windows 10 is not ICC aware, so all the colors and levels are off.

EDIT: updated the link for download 'cause I've uploaded the wrong files

@xupefei
Copy link
Member

xupefei commented Aug 31, 2018

I guess NConvert's -icc_ie -icc_in your_icc.icc will do the conversion.
Can you also share your monitor's ICC profile?

@Sandros94
Copy link
Author

Sandros94 commented Aug 31, 2018

Here it is. As far as I know NConvert doesn't have problem with ICM profiles. but I don't know it almost at all.

@Venzo92
Copy link

Venzo92 commented Oct 22, 2018

was this issue fixed? with latest windows build and quicklook version i still experience the same issue

@xupefei
Copy link
Member

xupefei commented Oct 23, 2018

Not yet. I have few time to work on this issue ( and on this project) recently.

@xupefei xupefei added this to the 0.3.7 milestone Oct 23, 2018
@Venzo92
Copy link

Venzo92 commented Oct 24, 2018

Not yet. I have few time to work on this issue ( and on this project) recently.

that's allright, but it looks like it still tries to load something from the icc profile which slows down the preview so in case there's no time to fix the icc would it be possible to disable icc evaluation alltogether and get it to load the preview faster at least? Other apps like microsoft photo and "quickviewer" have the icc disabled for performance purposes and load a lot faster

@lorenzbaum
Copy link

I would really love to hear, that this feature is in development and we all can experience it soon.

@gopgnz
Copy link

gopgnz commented Dec 23, 2020

Hey, I just recently discovered this great app! It's incredible and I would love to fully switch to it. However since I'm using a calibrated wide gamut monitor screen having built in color mangement where I can specify my monitor profile is detrimental. I really hope you can add this feature!!! @xupefei

I tried all kinds of different image viewers trying to find something that opens up and loads large files quickly and is generaly super intuitive. On top of that I handle 3D models a lot so that 3D preview addon is handy, too. WIthout CMS built in however all images I view are way off in color and especially saturation.

@raudjalg
Copy link

Hey, any update on this issue or have you disregarded this? Im a photographer and not being able to view photos like they are suppose to be showing is a problem. Photos (jpeg) are way too contrasty and saturated. :)

@xupefei
Copy link
Member

xupefei commented Jan 21, 2022

I think this issue is fixed. What's the problem?

@gopgnz
Copy link

gopgnz commented Jan 21, 2022

I think this issue is fixed. What's the problem?

It is? Have you impletemented color management into the app now? Does it locate the custom monitor color profile automatically as well or is there an option to assign a color profile of your choice?

@xupefei
Copy link
Member

xupefei commented Jan 21, 2022

@gopgnz
Copy link

gopgnz commented Jan 21, 2022

Now it reads the embedded color profile and re-map to your monitor profile: https://github.com/QL-Win/QuickLook/blob/master/QuickLook.Plugin/QuickLook.Plugin.ImageViewer/AnimatedImage/Providers/ImageMagickProvider.cs#L100

Thank you for the quick replies. I just installed it again and tested it but sadly it doesn't seem to work the way me or others here want it to. To illustrate it I opened the same image in Photoshop, in IrfanView (my current main image viewer...I have many gripes with it but it does feature proper color management) and your QuickLook app. Photoshop and IrfanView behave properly while QuickLook images appear oversaturated. That image even has an sRGB color profile embedded in it so there shouldn't be an interpretation issue either. I have also attached a screenshot of the color management tab within IrfanView. It is grabbing my monitor profile (which would be closer to AdobeRGB than sRGB) and I also set it to assume and treat images without any embedded profiles like they have an sRGB color profile in them.
Link: https://imgur.com/a/4QPPj3d

To explain my setup in more detail. I use a ProArt display from Asus which is a hardware calibrate-able wide gamut monitor with 100% sRGB and 99% AdobeRGB coverage. I have it calibrated to AdobeRGB which has a higher gamut than sRGB. If an app assumes that my screen is only capable of sRGB or thinks I'm running it with just sRGB coverage there is going to be that exact behaviour and my wide gamut monitor will end up boosting the colors in a similar manner (especially reds get oversatured quickly). The photographer who posted above reports that exact same example.

I commented here before but didn't get a reply. I'm really glad you came back to it and I would still LOOOOVE to switch and use your app as my main media viewer. I work in graphic design and cgi so having a quick, simple and reliable tool like that would make my life much easier.

@lorenzbaum
Copy link

I just looked into it and it seems that MagickImage does not use the Monitor ColorProfile. Therefore reading the embedded profile is not enough. (The library does this even automatically). I guess converting it from the embedded profile to the monitor profile might be an option.
Maybe you can have a detailed look into this topic as I experience exactly the same behavior like @gopgnz.

@xupefei
Copy link
Member

xupefei commented Jan 22, 2022

converting it from the embedded profile to the monitor profile

Well, this is the hardest part. I have no idea how to get the current monitor profile :D

@gopgnz
Copy link

gopgnz commented Jan 22, 2022

Well, this is the hardest part. I have no idea how to get the current monitor profile :D

If Windows doesn't tag whatever profile is currently used for the particular screen as the active/default one (allowing you to locate it that way) then maybe you could simply add a locate option? Meaning those who don't use wide gamut screens won't even need to do anything but those who do, would have the option of specifying the particular color profile. I typed in "color management" in the Windows search bar, opened that app and it showed me the name of the current color profile used for each monitor. The profile used for my wide gamut screen is called "PA329.icm". I then looked for that filename in C:\Windows and found it in "C:\Windows\System32\spool\drivers\color"

I do wonder how IrfanView is able to directly find the current monitor profile. It does have a custom search option too though.

Sadly I know zero about coding/programming and wouldn't even know where to begin trying to help you out. But it would be greatly appreciated if you could make this work and I'd definitely send at least some coffee/beer money your way as additional thanks.

@xupefei
Copy link
Member

xupefei commented Jan 23, 2022

Note to myself: https://docs.microsoft.com/en-us/windows/win32/api/icm/nf-icm-colorprofilegetdisplaydefault

A few things to be tested:

  • Performance impact: translation into sRGB is already super slow, per-monitor ICC might be even slower.
  • Compatibility: NET image component, now used to decode JPG and BMP and PNG, might not support ICC.

send at least some coffee/beer money your way as additional thanks

Thanks but no, I don't accept donations :)

@xupefei xupefei removed this from the 0.3.7 milestone Jan 23, 2022
@xupefei
Copy link
Member

xupefei commented Jan 23, 2022

Recently I moved my PC to the living room solely for gaming. I need to buy a new one (NUC maybe) for programming. Therefore it may take a while before I start working on this.

@gopgnz
Copy link

gopgnz commented Jan 23, 2022

Thanks but no, I don't accept donations :)

Wow, ok :D
Great, I appreciate you even considering to work on this. So whenever you find time ofc. Btw. I'm not in the know about hardware right now but I remember NUCs being quite expensive for what they were. Might even make more sense to buy an older laptop since their prices tend to drop quickly (especially if used).

Cheers!

@xupefei
Copy link
Member

xupefei commented Feb 13, 2022

22c08f6 should have fixed your issue. Could you try the nightly build with this config?

@gopgnz
Copy link

gopgnz commented Feb 13, 2022

22c08f6 should have fixed your issue. Could you try the nightly build with this config?

Hey, thanks so much for your work. I tried it but it didn't really change anything. I'm a noob when it comes to stuff like that so maybe the fault is on my side.

Here's what I did just so you can double check I did everything correctly:

  1. I uninstalled the QuickLook version that I installed via the Microsoft Store.
  2. I navigated to the AppVeyor link on the first Github page, downloaded and installed: "QuickLook-3.7.1-6-g1ed5f5b.msi"
  3. I quit the running instance of QuickLook.
  4. I navigated to "%APPDATA%\pooi.moe\QuickLook",
  5. I opened the "QuickLook.Plugin.ImageViewer.config" which only had this line inside: <?xml version="1.0" encoding="utf-8"?><Settings />
  6. I added the second line: <UseColorProfile>True</UseColorProfile>
  7. Pressed save and closed the file.
  8. I started QuickLook and opened a normal .jpg with an sRGB embedded profile. It's again off and as usual oversaturated compared to my other apps.
  9. I opened the "QuickLook.Plugin.ImageViewer.config" again and saw that the line I added was gone.
  10. I assumed that QuickLook simply replaced/restored the original version so I again closed QL, added the line to the config, now right-clicked the file and set it to read-only.
  11. I started QL again and a new file appeared in the folder by the name "QuickLook.Exception.log" and when I tried to press Spacebar onto any image, instead of seeing an enlarged view I only get tiny popups showing a thumbnail preview of images.

Btw. I also tried adding the line inbetween <?xml version="1.0" encoding="utf-8"?> and <Settings />. That also resulted in the file being restored after opening QL.

What could I be missing?

@xupefei
Copy link
Member

xupefei commented Feb 13, 2022

That's because your XML syntax is incorrect, I noted this in "Adding advanced configurations" section Point 3.
The correct config is the following:

<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <UseColorProfile>True</UseColorProfile>
</Settings>

@gopgnz
Copy link

gopgnz commented Feb 13, 2022

That's because your XML syntax is incorrect, I noted this in "Adding advanced configurations" section Point 3. The correct config is the following:

<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <UseColorProfile>True</UseColorProfile>
</Settings>

Ahhhhh, I see! I adjusted that accordingly and now it works!!! I see what you mean with slower operation but for majority of images it still seems to perform similar to IrfanView. It will be a great tool for quickly checking on images and closing them again with just another spacebar click. Thank you so much!

The only thing I'd like to do now is make it show images at 100% instead of it upscaling everything of lower resolution. For example 1920x1080px images are scaled up to around 150% for me whenever I hit spacebar (on a 4k screen). It would be cool to set it to show always 100% by default and only scale down images that are bigger than the native 4k screen resolution. I need to look into whether it's possible because I couldn't find a setting for that anywhere yet.

Again, thanks a lot. Grateful you took your time to add this feature and I'm glad I managed to get it running.

@Mac3DX
Copy link

Mac3DX commented Dec 17, 2023

Picking up the hook, I just calibrated my monitor, and it now supports a P3 color gamma. The thumbnails in Win 11 and the Windows Explorer preview are loading the P3 color profile perfectly, but Quick Look is not. It displays images in sRGB. I would assume that it should load the same color profile as the system, but it's not working.

@Mac3DX
Copy link

Mac3DX commented Dec 17, 2023

What may be happening is perhaps the opposite. QL is doing its job, and Win 11 is not. Because most of the images on the web are sRGB, they are looking a bit saturated in OS.

@Mac3DX
Copy link

Mac3DX commented May 20, 2024

Can't find this path anymore. %APPDATA%\pooi.moe\QuickLook
It seems color management is not working properly.

@fuweichin
Copy link

fuweichin commented Jun 19, 2024

Is there anybody who has successfully enabled color management for QuickLook?

I tried to preview a P3 image with QuickLook 3.7.3 but got unexpected colors.

  1. My laptop monitor supports 100% DCI-P3 and is set to use the Display P3 color space.
  2. Windows 10 is set to use color profile "Display P3.icc" for the monitor.
  3. QuickLook (QuickLook.Plugin.ImageViewer.config) is set to UseColorProfile.

Chrome, ImageGlass and Microsoft Photos (on Windows 11) can render P3 images as expected.

See testing image Webkit-logo-P3.png and Interactive Image Comparison

@Mac3DX
Copy link

Mac3DX commented Jun 19, 2024

Unfortunately, Windows is not a color managed system. Which Sucks! I guess only Photos is color managed.
I also own a P3 monitor but still running srgb color space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants