newbe- mapscript /pil
Richard Alexander
raxpl at ANGLESEY.GOV.UK
Wed Jul 13 04:16:23 PDT 2005
hi
I want to open an image created by mapscript using PIL...
I'm using python2.3 on Suse Linux Enterprise Server 9 (not this windows
machine so there may be some minor punctuation errors below)
from Tkinter import *
import mapscript
import Image
theMap = mapscript.mapObj('/srv/www/htdocs/workshop/itasca.map')
theMapImage = theMap.draw()
theMapImage.save('srv/www/htdocs/workshop/tmp.png')
#the above line produces a png image in the correct folder
theImage = Image.open('srv/www/htdocs/workshop/tmp.png')
#the above line causes an IOError to be thrown which seems to
#be triggered by the Load function...
#end
After the program finishes I can open the png image tmp.png in all
other graphics programs - Pil continues to refuse to open it !
any ideas ?
cheers
RA
More information about the MapServer-users
mailing list