How do you get the image out of imageObj without having to save it?

Ethan Alpert ealpert at DIGITALGLOBE.COM
Wed Oct 6 14:31:50 PDT 2004


print $q->header(-type=>'image/png');

. . .

$img = $map->draw();

$out = "/usr/local/apache/htdocs/tmp/$$_myaction.png";

$img->save($out);

$myimg = Slurp::to_scalar($out);

print $myimg;


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Jim
Sent: Wednesday, October 06, 2004 3:10 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] How do you get the image out of
imageObj without having to save it?


No, just use Content type image/jpeg


Jim Burnett
Free Visual Basic.NET GIS
http://www.visualbasicgis.com/



----- Original Message -----
From: "Ethan Alpert" <ealpert at DIGITALGLOBE.COM>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Wednesday, October 06, 2004 1:58 PM
Subject: [UMN_MAPSERVER-USERS] How do you get the image out of imageObj
without having to save it?


> $img = $map->draw();
>
> Now I just want to return the image with the correct content type from

> my CGI. Do I really need to save it first to do this?
>
> -e



More information about the MapServer-users mailing list