Hi all,<br><br>I&#39;m trying to pass a python mapscript image object directly into GDAL, and can&#39;t seem to hit on the correct mapscript object to feed it with.  <br><br>- Passing a valid WMS url directly into GDAL works fine, like this.<br>
<br>url = &quot;<a href="http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/sav0656/basemap.map&amp;layers=Ditches&amp;styles=&amp;service=WMS&amp;width=1056&amp;format=image%2Fpng&amp;request=GetMap&amp;height=1056&amp;srs=EPSG%3A900913&amp;version=1.1.1&amp;bbox=19411336.2028%2C19411336.2028%2C60738697.1524%2C60738697.1524">http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/sav0656/basemap.map&amp;layers=Ditches&amp;styles=&amp;service=WMS&amp;width=1056&amp;format=image%2Fpng&amp;request=GetMap&amp;height=1056&amp;srs=EPSG%3A900913&amp;version=1.1.1&amp;bbox=19411336.2028%2C19411336.2028%2C60738697.1524%2C60738697.1524</a>&quot;<br>
gdal.Open(url)<br><br>- However, none of these mapscript objects can seem to be read in a similar way:<br><br>  mapobject = mapscript.mapObj(&#39;basemap.map&#39;)<br>  imageobject = mapobject.draw()<br>  f = StringIO()<br>
  imageobject.write(f)<br>  gdal.Open(f)<br><br>TypeError: in method &#39;Open&#39;, argument 1 of type &#39;char const *&#39;<br><br>- or:<br><br>  mapobject = mapscript.mapObj(&#39;basemap.map&#39;)<br>  imageobject = mapobject.draw()<br>
  buffer = imageobject.getBytes()<br>  gdal.Open(buffer)<br><br>(Creates a &#39;NoneType&#39; object without any attributes or methods)<br><br><br>So I&#39;m guessing that the image object that&#39;s written as the result of the WMS request is somehow different from the objects written by imageObj.write() and imageObj.getBytes().  Any ideas on how to mimic this?<br>
<br>Thanks,<br><br>Roger<br>--<br>