Mapscript image object creation.

Abe Gillespie abe.gillespie at GMAIL.COM
Wed Dec 14 21:35:03 EST 2005


That's a very nifty trick that I wasn't familiar with.  Now for
another wish.  Can you convert a MapServer image object to a PHP image
object in memory?  I've always assumed you couldn't and would first
save the image to disk and then load the file in PHP.  It'd be more
desirable to skip the disk writing part.

Thanks.
-Abe

On 12/14/05, Mark Wright <sparkymeister at gmail.com> wrote:
> In the map img tag set the src attribute to a php file with a
> querystring stating everything needed to get the correct map and
> settings. When it's time to save the generated image do the following:
>
> header('Content-type: image/png');
> $image->saveImage('');
>
> This will send the image to the browser instead of saving it to disk
> and set the proper mime type so that the browser knows it is receiving
> image data. If you are generating an image in a format other than png
> simply change the content-type to match.
>
>
> Mark
>
> On 12/14/05, Paul Moen <pmoen at state.nd.us> wrote:
> > Does anyone know how to take an ImageObj in Mapscript and send the output to a variable in PHP
> > rather than to standard out or a disk file?
> >
> > I am looking for something like $imageVar = $imgOb->saveImage('');
> >
>
>
> --
> Have fun or die trying - but try not to actually die.
> http://www.AboveCalifornia.com
> Got Mac OS X? Get the AboveCalifornia Sherlock Channel:
> sherlock://www.AboveCalifornia.com/sherlock/SherlockChannel.xml?action=add
>



More information about the mapserver-users mailing list