Phobos colour module?

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 31 23:16:17 PST 2014


On 1/01/2015 7:38 p.m., Manu via Digitalmars-d wrote:
> I've been working on a pretty comprehensive module for dealing with
> colours in various formats and colour spaces and conversions between
> all of these.
> It seems like a hot area for duplicated effort, since anything that
> deals with multimedia will need this, and I haven't seen a really
> comprehensive implementation.
>
> Does it seem like something we should see added to phobos?
>
> My colours can be used as high-level colour values for precise numeric
> work, or specify encodings such that they are directly useful to
> represent pixels in images of basically any format/layout for
> rendering use.
>
> Unlike a full-blown image library which will often be implemented in
> different ways for different uses, I can't imagine colours/pixels
> could have a great number of implementation styles where different
> API's would have any reason to compete, and as such, it seems like a
> nice thing to standardise. Standardised colours would make it *much*
> easier for competing image libraries to interact.
>
> With standard colours, image libraries would tend to distinguish
> themselves in terms of memory management, data layout, image
> processing patterns and api, etc. Those are all valid cases for
> different designs, but I can't imagine any reason for distinct colour
> api's.
>
> Comprehensive colour-space management and minimum-loss encoding is a
> lot of work, and almost every implementation ignores facets of the
> puzzle that aren't obviously relevant.
>
> It would give a good foundation for other std.image related libraries
> to be built on top.
> I'm also working on a graphing lib, and that requires to output images.
> It would be *really* nice to support common image format
> readers/writers in the std library which need to handle pixel data.
>
> Thoughts?

Please do.
This was part of my goal with Devisualization.Image just without the 
phobos part.



More information about the Digitalmars-d mailing list