Emulating mode=map with python mapscrip t

Howard Butler hobu at IASTATE.EDU
Wed Dec 8 14:54:54 EST 2004


Adam,

No, as I was saying this is an older mapscript variant.  Do what you were
doing, but just add an extra \n by giving it a print with a blank
line.  Sorry for the confusion.

print "Content-type: image/jpeg"
print
print mapImg.write()

At 01:49 PM 12/8/2004, Ryan, Adam wrote:
>Hey, thanks for the reply.
>
>So I have to save the image in order to spit it back?  Is there no way to do
>this w/o saving?
>
>Adam
>
> > -----Original Message-----
> > From: Howard Butler [mailto:hobu at IASTATE.EDU]
> > Sent: Wednesday, December 08, 2004 11:39 AM
> > To: MAPSERVER-USERS at LISTS.UMN.EDU
> > Subject: Re: [UMN_MAPSERVER-USERS] Emulating mode=map with
> > python mapscript
> >
> >
> > I think you need a blank line after the content type.  Here
> > is how I did it with earlier mapscript
> >
> > >             print "Content-type: image/jpeg"
> > >             print
> > >             output = open(drgimagefilename, 'rb').read()
> > >             print output
> >
> > That extra print statement after the printing of the content
> > type ends the header block.
> >
> > Howard
> >



More information about the mapserver-users mailing list