Hello all
Looks like the imageObj.save(filename) metod doesn't work properly
I correctly set IMAGEPATH and IMAGEURL in mapfile:
WEB
IMAGEPATH "C:/Inetpub/wwwroot/output"
IMAGEURL "http://localhost/output"
END
If I try to write the image to disk with imageObj.save(filename) the image is not saved in the IMAGEPATH location, but in the mapfile's folder.
For example if I save the image:
imageObj.save("test.jpg")
The image test.jpg is not written under IMAGEPATH("C:/Inetpub/wwwroot/output") but in the mapfile folder (another folder).
The workaround is to give the fullname of image, like here:
public override String GetURLMap()
{
//refresh map
imageObj image = map.draw();
//be sure to have set Web parameters in mapfile (IMAGEPATH, IMAGEURL)
//return URLMap
String ImageName = DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + "." + map.outputformat.extension;
image.save(image.imagepath + "\\" + ImageName, map);
//image.save(ImageName, map);
return image.imageurl + "/" + ImageName;
}
but I am wondering how no one still pointed out this bug, maybe I configured something wrong in map file.
Any help appreciated
Paolo Corti
http://www.paolocorti.net
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/c--imageObj.save-method-not-working-properly--tf2501170.html#a6972489">c# imageObj.save method not working properly?</a><br>
Sent from the <a href="http://www.nabble.com/Mapserver---User-f1215.html">Mapserver - User</a> mailing list archive at Nabble.com.<br>