Boost logo

Boost :

From: John Femiani (JOHN.FEMIANI_at_[hidden])
Date: 2008-06-18 12:30:28


 
>
> There have been thread before about doing fast alpha blends
> with GIL views. Here is what I settled with.
>
> boost::gil::gray8c_view_t grayview =
>
> boost::gil::interleaved_view(width,height,(gray8_pixel_t*)buff
er,width);
>
...
> dst = ((dst + 1) * alpha >> 8) -
> ((src + 1) * alpha >> 8) +
> src;

I think that is specific to 8bit channels. What I think is needed is
some kind of support for scaled integers, so that alpha blending (or
other numeric ops) can be done efficiently for channels that are scaled
integers as well as for other types such as float.

--John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk