For a project I&#39;m currently working on, we&#39;re creating a density layer on a mapfile. The same thing was once attempted by Bill Binko and his work is currently being used as inspiration. <br><br>What we&#39;d like to do is make a map containing (from bottom to top): 
<br><br>a raster layer<br>a semi transparent layer we calculate ourselves<br>a feature layer<br><br>The problem we encounter is how to combine the mapserver layers with the layer we calculate in PHP. We&#39;re planning to calculate the layer using php functions and then using php&#39;s image functions to create an overlay image. This will give us a GD image in memory. What we can do, and Bill has already done so, is to save the mapserver generated layers to the file system and then reopening them using php&#39;s image functions and using php&#39;s image functions to stack them onto each other and create a final image the client can use.
<br><br>The problem with this solution is that it&#39;s hardly elegant and requires quite a bit of disk I/O that really isn&#39;t necessary and is therefore quite slow. Is there some way we can use the imageObj in mapscript to paste the in-memory calculated php GD image onto? Another solution would be to allow imageObjs to be transformed into php image objects. Is there a way to do such a thing?
<br><br>Any help will be greatly appreciated<br clear="all"><br>-- <br>Martin van Dijken<br>Senior ontwikkelaar / Technisch projectleider<br>                <br>M +31 (0)6 26 144 223<br>E <a href="mailto:martin@van-dijken.eu">martin@van-dijken.eu
</a><br>                <br>IPROFS<br><a href="http://www.iprofs.nl">www.iprofs.nl</a><br><br>Gebouw &quot;De Houthof&quot;<br>Claus Sluterweg 125<br>2012 WS Haarlem<br><br>T +31 (0)23 547 6369<br>F +31 (0)23 547 6370