c# imageObj.save method not working properly?
Paolo Corti
pcorti at GMAIL.COM
Tue Oct 24 06:13:47 PDT 2006
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
--
View this message in context: http://www.nabble.com/c--imageObj.save-method-not-working-properly--tf2501170.html#a6972489
Sent from the Mapserver - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061024/7530dafe/attachment.htm>
More information about the MapServer-users
mailing list