Hi, All, Official document on mapserver site said use following way to create an imageObject instance in python. look at this link<http://mapserver.org/mapscript/mapscript.html#imageobj>
new imageObj( int width, int height [, outputFormatObj<http://mapserver.org/mapscript/mapscript.html#outputformatobj> format=NULL [, string filename=NULL ] ] ) : imageObj So I create imageObject in Python by this, mapscript.imageObj(100,100,"GD/PNG", ' http://mapserver.org/_static/banner.png') But get error, "Segmentation fault (core dumped)". Then I check the test case of python binding. The test case for imageObject is in imagetest.py. I try it firstly. Then many cases failed, include the case for create imageObject instance. I found the create method in test script is in other way. def testConstructorUrlStream(self): """imageObj with a URL stream works""" url = urllib.urlopen('http://mapserver.org/_static/banner.png') imgobj = mapscript.imageObj(url, 'GD/JPEG') assert imgobj.thisown == 1 assert imgobj.height == 68 assert imgobj.width == 439 imgobj.save('testConstructorUrlStream.jpg') What's the correct way to create an imageObject from url or file? Thanks, Shawn
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
