setsize(400, 300); // set image format $oMap->selectoutputformat("png"); // get layer $oPolyLayer = $oMap->getLayerByName('prov_bound'); // set opacity (actually creates a new COMPOSITE object) $oPolyLayer->setOpacity(40); // draw map $oImage = $oMap->draw(); // save image file $file = $oImage->save("C:/ms4w/apps/phpmapscriptng-swig/ttt.png",$oMap); // save mapfile to new file $oMap->save("C:/ms4w/apps/phpmapscriptng-swig/output2.map"); // set header header("Content-type: image/gif"); // read image to output buffer readfile("C:/ms4w/apps/phpmapscriptng-swig/ttt.png"); ?>