here I wrote a little function, that should do the job, too:

Code:
void create_flare(BMAP* picture)
{
VECTOR picture_size;
VECTOR paintPos;
int i;
int format;
float pixel;
picture_size.x = bmap_width(picture);
picture_size.y = bmap_height(picture);
format = bmap_lock(picture,0);
for(i=0;i<picture_size.x*picture_size.y;i++)
{
paintPos.x = i%picture_size.x;
paintPos.y = (picture_size.y-1)-integer(i/picture_size.x);
pixel=pixel_for_bmap(picture,paintPos.x,paintPos.y);
pixel_to_vec(temp,NULL,format,pixel);
pixel = pixel_for_vec(temp,(temp.x+temp.y+temp.z)/3/2.55,format);
pixel_to_bmap(picture,paintPos.x,paintPos.y,pixel);
}
bmap_unlock(picture);
}