<AWT Dev> LinearRGBConverter bug

Andrey Kuzmenko andreykuzmenko at gmail.com
Mon Jan 18 09:06:47 UTC 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160118/f1a584c5/attachment.html>


More information about the awt-dev mailing list