mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 09:49:07 +00:00
Fix #669: convert image to sRGB only when the original ColorSpace is RGB, sRGB, or scRGB
This commit is contained in:
@@ -96,7 +96,11 @@ namespace QuickLook.Plugin.ImageViewer.AnimatedImage.Providers
|
|||||||
using (var mi = new MagickImage(Path, settings))
|
using (var mi = new MagickImage(Path, settings))
|
||||||
{
|
{
|
||||||
var profile = mi.GetColorProfile();
|
var profile = mi.GetColorProfile();
|
||||||
if (profile?.Description != null && !profile.Description.Contains("sRGB"))
|
if (mi.ColorSpace == ColorSpace.RGB ||
|
||||||
|
mi.ColorSpace == ColorSpace.sRGB ||
|
||||||
|
mi.ColorSpace == ColorSpace.scRGB &&
|
||||||
|
profile?.Description != null &&
|
||||||
|
!profile.Description.Contains("sRGB"))
|
||||||
mi.SetProfile(ColorProfile.SRGB);
|
mi.SetProfile(ColorProfile.SRGB);
|
||||||
|
|
||||||
mi.AutoOrient();
|
mi.AutoOrient();
|
||||||
|
Reference in New Issue
Block a user