This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author petr.viktorin
Recipients petr.viktorin, terry.reedy, thomas.stolarski, vstinner
Date 2021-11-23.15:25:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1637681120.82.0.0860629216346.issue45775@roundup.psfhosted.org>
In-reply-to
Content
> YUV is a common color encoding system. It's used by the JPEG image format and MPEG video format for example.

As far as I understand it, the YUV/RGB conversion used by JPEG is not the same as the one used by MPEG, and neither of those is the Rec 709 YUV proposed here.

YUV is used in video production and photography. If you need to work with it, you most likely need some kind of precise color matching. If colorsys implements the wrong one *for you* (even if it's the most commonly used one, and what HDTV uses), then the stdlib has failed you.

Meanwhile, RGB/HLS is used by Web designers writing CSS, GUI authors giving you a big green button to click, or color pickers for your avatar's hair. They're designing for uncalibrated monitors. *That* is the target audience for colorsys.
The image libraries these people use to read JPGs invariably convert to RGB and throw away any precise color information, which is meaningless on uncalibrated monitors.

I cannot see a use case for YUV in colorsys that doesn't also require a more complex image processing library. It's that library that should provide the necessary colorspace conversions, depending on if it's dealing with JPEG or MPEG or HDTV.

But please point out my mistakes and clear my doubts!
History
Date User Action Args
2021-11-23 15:25:20petr.viktorinsetrecipients: + petr.viktorin, terry.reedy, vstinner, thomas.stolarski
2021-11-23 15:25:20petr.viktorinsetmessageid: <1637681120.82.0.0860629216346.issue45775@roundup.psfhosted.org>
2021-11-23 15:25:20petr.viktorinlinkissue45775 messages
2021-11-23 15:25:20petr.viktorincreate