[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-awt-dev
Subject:    <AWT Dev> LinearRGBConverter bug
From:       Andrey Kuzmenko <andreykuzmenko () gmail ! com>
Date:       2016-01-18 9:06:47
Message-ID: CAFDwXmbsavL0v92=YYxuVEhSbvhCusaS5sUtaegBbf-M+DuaKg () mail ! gmail ! com
[Download RAW message or body]

Hi guys, I think there is a bug in LinearRGBConverter class. In this method:

public float[] toRGB(float[] in);

The following lines:

if (n <= 0.00304f)
  out[i] = in[0] * 12.92f;

Should be:

if (n <= 0.00304f)
  out[i] = n * 12.92f;

(What it does now is propagate Red to all channels at the very low
intensity, which is not noticeable much, but nevertheless is a bug, I
think.)

Cheers,
Andrey

[Attachment #3 (text/html)]

<p dir="ltr">Hi guys, I think there is a bug in LinearRGBConverter class. In this \
method:</p> <p dir="ltr">public float[] toRGB(float[] in);</p>
<p dir="ltr">The following lines:</p>
<p dir="ltr">if (n &lt;= 0.00304f)<br>
   out[i] = in[0] * 12.92f;</p>
<p dir="ltr">Should be:</p>
<p dir="ltr">if (n &lt;= 0.00304f)<br>
   out[i] = n * 12.92f;</p>
<p dir="ltr">(What it does now is propagate Red to all channels at the very low \
intensity, which is not noticeable much, but nevertheless is a bug, I think.)</p> <p \
dir="ltr">Cheers,<br> Andrey<br>
</p>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic