[MapServer-users] PHP-Mapscript: write imageObj to stdout

Sven Schroeter schroeter at netgis.de
Mon Nov 13 07:02:07 PST 2023


msIO_getStdoutBufferBytes is the mapscript function and fetch the 
current stdout buffer contents as a binary buffer:
https://mapserver.org/mapscript/mapscript-api/index.html

I think its the same?


Sven



Am 13.11.2023 um 15:45 schrieb Jan Hartmann:
> Yes, this works. Thanks Vassili and Sven. Is there any difference 
> between getBytes() and msIO_getStdoutBufferBytes()?
>
> On 13/11/2023 09:51, Vassilis Chatzigiannakis via MapServer-users wrote:
>> Yes, in php using swig it would be:
>>
>> $oImg = $this->oMap->draw();
>> echo $oImg->getBytes()
>>
>> -----Original Message-----
>> From: MapServer-users <mapserver-users-bounces at lists.osgeo.org> On 
>> Behalf Of Sven Schroeter via MapServer-users
>> Sent: Monday, November 13, 2023 10:44 AM
>> To: mapserver-users at lists.osgeo.org
>> Subject: Re: [MapServer-users] PHP-Mapscript: write imageObj to stdout
>>
>> Hi Jan,
>>
>> maybe you need this:
>>
>>               //SWIG
>>               if($mapscriptSwig) {
>>                   echo msIO_getStdoutBufferBytes();
>>               }else{
>>                   echo ms_iogetStdoutBufferBytes();
>>               }
>>
>> Sven
>>
>>
>> Am 10.11.2023 um 18:59 schrieb Jan Hartmann via MapServer-users:
>>> Hi,
>>>
>>> In previous versions of PHP-Mapscript there was a function
>>> ImageObj->saveImage(fn), that wrote an ImageObj to a file on disk.
>>> When fn was empty, the image was sent to stdout. In SWIG-Mapscript,
>>> this function has been replaced by ImageObj->save(fn), but fn cannot
>>> be empty anymore. How do I send an ImageObj directly to stdout (i.e.
>>> to the browser)?
>>>
>>> Jan
>>> _______________________________________________
>>> MapServer-users mailing list
>>> MapServer-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> _______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231113/b4739e28/attachment.htm>


More information about the MapServer-users mailing list