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

Reply via email to