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

List:       gnuplot-info-beta
Subject:    YIQ color space palette - fix or remove?
From:       sfeam via gnuplot-beta <gnuplot-beta () lists ! sourceforge ! net>
Date:       2017-10-25 2:56:50
Message-ID: 1517157.hCi55C8fG1 () stonelion
[Download RAW message or body]

I propose to drop YIQ colorspace from 5.3

When color palette support was merged into gnuplot in 2001, it included
support for RGB HSV CMY YIQ XYZ color spaces.
It may well be that in the intervening 16 years no one has ever
tried to use YIQ.

Bug #1981 points out that it never worked

1) the YIQ_2_RGB() color conversion routine uses incorrect coefficients

2) the permitted range of I is [-.5957:.5957], for Q it is [-.5226:.5226]
but the "set palette" code and the grayscale conversion code truncate
all color components to [0:1] so it is not possible to enter general
YIQ triples

3) the "set palette defined (gray1 R G B, gray2 R G B, ...) syntax cannot
handle negative numbers because the leading - sign would be parsed
as an operator.   E.g.  set palette defined (0 0.5 -0.5 -0.5) is parse as
two numbers rather than four.   That isn't necessarily a fatal flaw since
there are other ways to define a palette, but "defined" does not and can
not work for the full range of YIQ values.

Furthermore the transform provided goes in the wrong direction.
It might make sense to accept YIQ values and produce a grayscale.
That's what black & white television did.   But what use case is there
for providing a grayscale value and converting it to a YIQ triple that
cannot be displayed without subsequenting re-converting it to RGB?

(1) and (2) are fixable.  (3) is not.  
Given that this never worked and as noted it has no obvious
use anyhow, is it OK to simply remove all mention of YIQ support
rather than trying to repair it?

	Ethan


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
[prev in list] [next in list] [prev in thread] [next in thread] 

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