Re: [css3-background] vastly different takes on "blur"

On Jun 21, 2010, at 5:51 PM, Brian Manthos <brianman@microsoft.com>  
wrote:

> When I toss a Firefox screenshot into mspaint and fill the outside  
> area with red, it suggests (via the non-red pixels) that the actual  
> impact of blur parameter of 20px is around 18px, and for blur  
> parameter of 40px it's around 33px.
>
>
> So now I'm not sure what an author should expect.
>
> Should he/she expect a "mathematical blur" that extends  
> BlurParameter outside of the geometry but visually looks like only a  
> third to half of the BlurParameter to human perception?

It is a clever test. Your paint bucket technique is similar to what I  
was doing with PhotoShop's magic wand tool, with tolerence set to zero  
and no antialiasing. It was not working so well in in Webkit and your  
test just now though, as the spread area was full of subtle noise.  
Something about how Webkit applies spread, I guess.

Anyway, I think some of the discrepency was maybe because the human  
eye (mine, at least) is better at seeing the fine shade differences in  
the lighter areas than in the darker areas. So I did my pixel counting  
using black shadows against a white background, and also reversed the  
shadows back and forth in PhotoShop. Since a shadow can be any color,  
even white, I was satisfied basing my counts on the highest contrast  
(black against white) and the fact that Photoshop seemed to not  
discriminate the brightness differences of less than 1%. Then it  
wasn't too far off from my perception, especially when reversing the  
colors to see better in the dark areas.

I did notice that for larger blurs there did seem to be a couple extra  
black pixels left over in the inner half of the expected blur area,  
but the halfway point of that area did indeed seem to split the  
lighter pixels from the darker. So I figured it was an optimization  
(in the screen capturing, perhaps?) or some rounding of <0.5% darkness  
pixels going on. 

Received on Tuesday, 22 June 2010 02:22:26 UTC