Page 1 of 1
Totally Stuck - GD Heatmap
Posted: Mon Sep 28, 2009 4:58 pm
by HavokDelta6
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Re: Totally Stuck - GD Heatmap
Posted: Mon Sep 28, 2009 5:29 pm
by Jade
I would setup an array of colors. Red being highest, blue being lowest, or however you decided you want higher elevations to be discerned from lower elevations.
Then run through your array, replace the higher numbers with the red/redish colors and the lower numbers with the lower/lower colors for each point on a new graphic image.
Take a look at this function:
http://www.php.net/manual/en/function.imagesetpixel.php
You can go through pixel by pixel and set the appropriate color for that x,y coord.