Message155915
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. |
|
Date |
User |
Action |
Args |
2012-03-15 17:19:37 | packetslave | set | recipients:
+ packetslave |
2012-03-15 17:19:37 | packetslave | set | messageid: <1331831977.5.0.174772346075.issue14323@psf.upfronthosting.co.za> |
2012-03-15 17:19:36 | packetslave | link | issue14323 messages |
2012-03-15 17:19:36 | packetslave | create | |
|