Thanks for your reply.
now i got atleast one idea how to start. but one doubt remains. how to get the pixel value for the function.
pixel_to_bmap(BMAP* bmap,var x,var y,var pixel);
as far as i understand this is the color of the pixel that shouls be set. right? if yes how to get it out of my red, green and blue chanels?
thanks