New submission from Brian Landers <br...@packetslave.com>: 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. ---------- components: Library (Lib) files: colorlib.patch keywords: patch messages: 155915 nosy: packetslave priority: normal severity: normal status: open title: Normalize math precision in RGB/YIQ conversion type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file24866/colorlib.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com