Phobos colour module?

Xavier Bigand via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 4 06:20:00 PST 2015


Le 01/01/2015 07:38, Manu via Digitalmars-d a écrit :
> 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?
>
I will enjoy to see a colour/image module in phobos a day.
There is some filters very usefull that are almost unknow like the 
per-multiplied alpha bleeding need to be democratized to improve GUI 
rendering quality.
There is so much issues on images data when rendering on GPU that have 
common fix make me think phobos is a great place for such modules.

Some explainations :
https://www.youtube.com/watch?v=dU9AXzCabiM


More information about the Digitalmars-d mailing list