I'm coding some fire effects - works well, very very nice ! (tell me if you are interested by sources then i put it on ftp) i found explainations on
http://logarno.planet-d.net/djgfxfr/
the problem in that source is that i set a palet of colours, then for each pix i have to find the average of 3 or 4 other pixs. when i use getpixel, i get the real value of the pix, but not a palet index so i have to test all the values of my palet to retrieve the index wich makes it a little slow

so here is my question: how can i quickly find the palet[index] of a pixel without testing all the palet values ???