From 2668bab9695170efd6a77220f5dc35ad68983c75 Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Tue, 27 Aug 2024 19:26:36 +0200 Subject: [PATCH] awt: convert images to linear sRGB according to IEC 61966-2-1 --- .../sf/carte/echosvg/ext/awt/image/rendered/Any2LsRGBRed.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/echosvg-awt-util/src/main/java/io/sf/carte/echosvg/ext/awt/image/rendered/Any2LsRGBRed.java b/echosvg-awt-util/src/main/java/io/sf/carte/echosvg/ext/awt/image/rendered/Any2LsRGBRed.java index 36e774e5c..40519648b 100644 --- a/echosvg-awt-util/src/main/java/io/sf/carte/echosvg/ext/awt/image/rendered/Any2LsRGBRed.java +++ b/echosvg-awt-util/src/main/java/io/sf/carte/echosvg/ext/awt/image/rendered/Any2LsRGBRed.java @@ -69,7 +69,7 @@ public Any2LsRGBRed(CachableRed src) { private static final double LFACT = 1.0 / 12.92; public static final double sRGBToLsRGB(double value) { - if (value <= 0.003928) + if (value <= 0.04045d) return value * LFACT; return Math.pow((value + 0.055) / 1.055, GAMMA); }