Author packetslave
Recipients packetslave
Date 2012-03-15.17:19:36
SpamBayes Score 2.34864e-08
Marked as misclassified No
Message-id <1331831977.5.0.174772346075.issue14323@psf.upfronthosting.co.za>
In-reply-to
Content
There doesn't seem to be a standard definition for the constants to use when doing the matrix calculations to convert RGB to YIQ or vise versa.  

Also, the current colorsys library uses two digits of precision for RGB-YIQ but six digits for YIQ-RGB.

The attached patch standardizes both functions to use the same constants as Matlab, using the same 3 digits of precision.  This makes a roundtrip of RGB->YIQ->RGB return the original values (for 3 digits of precision).

Also added tests, which brings colorsys.py to 100% coverage.
History
Date User Action Args
2012-03-15 17:19:37packetslavesetrecipients: + packetslave
2012-03-15 17:19:37packetslavesetmessageid: <1331831977.5.0.174772346075.issue14323@psf.upfronthosting.co.za>
2012-03-15 17:19:36packetslavelinkissue14323 messages
2012-03-15 17:19:36packetslavecreate