OT: Blur Effect

Hello Guys,

Any links on how to "blur" a surface? I want an algorithm I can apply to a 

surface (I really want to do drop shadows:). I have not found much on
google…

Thanks!–
Eduardo B. Fonseca
ebf at aedsolucoes.com.br
19:57:36 up 8:57, 1 user, load average: 0.26, 0.33, 0.44

In pseudocode:

for y = every line in the surface:
for x = every row in the line:
r1,g1,b1 = pixel at x,y;
r2,g2,b2 = pixel at x + 1,y;
r3,g3,b3 = pixel at x,y + 1;
r4,g4,b4 = pixel at x + 1,y + 1;
set pixel at x,y to:
(r1 + r2 + r3 + r4) / 4,
(g1 + g2 + g3 + g4) / 4,
(b1 + b2 + b3 + b4) / 4;

It’s kinda slow, but it does the trick. You’ll also get an artifact
at the far right and very bottom.

You can also do a number of variations on this
(only use 2 or 3 pixels in the average, for example)

-bill!On Mon, Apr 07, 2003 at 07:58:59PM -0300, Eduardo B. Fonseca wrote:

Hello Guys,

Any links on how to “blur” a surface? I want an algorithm I can apply to a
surface (I really want to do drop shadows:). I have not found much on
google…