Colour operations using CyberShadow's graphics library
Phil via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jan 18 13:10:03 PST 2015
Hi, I'm new to D and having a go at writing some image processing
stuff using Vladimir's ae.graphics library.
To filter (i.e. perform correlations/convolutions) on a view with
colour type C, I'd like to perform intermediate calculations
using a colour with the same number of channels as C, but all of
type double, and then to convert back to something of type C at
the end.
e.g. for a horizontal blur I'd like to keep a running total per
channel, packaged in an all-doubles colour type, and then write
(total / kernel width) for each channel back into a value of type
C.
How do I perform the necessary type magic here? Thanks
More information about the Digitalmars-d-learn
mailing list