colour lib needs reviewers

Manu via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 12 07:12:35 PDT 2016


On 12 September 2016 at 21:31, Guillaume Chatelet via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Monday, 12 September 2016 at 04:14:27 UTC, Manu wrote:
>>
>> I think I'm about as happy with my colour lib as I'm going to be. It
>> really needs reviews.
>>
>> I added packed-RGB support, including weird micro-float and
>> shared-exponent formats.
>> They're important for interacting with any real-time rendering libraries.
>> There is only one texture format I'm aware of that isn't supported,
>> and that is u7e3 floats, only available on Xbox360 ;)
>>
>> Chromatic adaptation functions are in.
>> I've done a tidy/reorg pass.
>>
>> I'm not sure what else should be in the scope of this lib.
>>
>> PR: https://github.com/dlang/phobos/pull/2845
>> dub: https://code.dlang.org/packages/color
>> docs:
>> http://dtest.thecybershadow.net/artifact/website-04a64e024cf75be39700bebd3a50d26f6c7bd163-7185c8ec7b15c9e785880cab6d512e6f/web/library-prerelease/std/experimental/color.html
>>
>> - Manu
>
>
> And also, do you handle limited (16-235) to full dynamic range (0-255)
> conversions?

Actually, I spent quite some time stressing about dynamic range.
Trouble is, there's no real format spec's relating to dynamic range,
it tends to be by convention.
I'm not sure what the API would look like, so I haven't approached that problem.
It's very easy to do the transform yourself, I don't really think it
needs to be part of the type, particularly since there's no
conventional way to express it.

Note also that I didn't do any YUV formats (this case you discuss is
usually related to older broadcast formats)... didn't know if they'd
be particularly useful to people. At least, it's not in my initial
offering.


More information about the Digitalmars-d mailing list