Am Mon, 12 Sep 2016 14:14:27 +1000 schrieb Manu via Digitalmars-d <[email protected]>:
> 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 Nice work. What's u7e3? 3*10-bit-floats + 2-bit padding? In the example for convert color you show that converting from a color space without alpha (XYZ) to one with alpha (RGBA) turns the pixel transparent. I believe you meant this as something to lookout for when converting colors. What's the reasoning for not setting maximum alpha as a more useful and natural default? Cool stuff there in the colorspace module, to get started with getting photos or DV/MPEG into a linear color space. Should BT.709 also have prefab conversion methods? It would seem HD video is more wide spread nowadays. There is a typo in "Function that converts a linear luminance to gamme space." (colorspace.d) I like how RGB color spaces are described as primaries in xyY + gamma functions. It seems inconsistent that you can specify all kinds of exponents when the exponent is shared but are forced to 5 bit exponents when mixed into each component, while the mantissa can still be adjusted. Would m7e3 have worked? (With f* being the IEEE standard formats.) The final package should contain a fair amount of documentation, in my opinion also on the topics of sRGB vs. linear and what "hybrid gamma" is. What is your stance on pixel formats that are arranged in planes? I assume that e.g. YUV is handled by a single channel "sRGB luminance" + 2 signed 8-bit color planes? It may be worth adding some hints in that direction. All in all good work with a scientific feel to it. -- Marco
