<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    msIO_getStdoutBufferBytes is the mapscript function and fetch the
    current stdout buffer contents as a binary buffer:<font face="Arial"><br>
      <a class="moz-txt-link-freetext" href="https://mapserver.org/mapscript/mapscript-api/index.html">https://mapserver.org/mapscript/mapscript-api/index.html</a><br>
      <br>
      I think its the same?<br>
      <br>
    </font>
    <div class="moz-signature"><br>
      Sven<br>
      <br>
      <br>
      <br>
    </div>
    <div class="moz-cite-prefix">Am 13.11.2023 um 15:45 schrieb Jan
      Hartmann:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20863238-f1f1-4903-9e7a-b4df398480b7@gmail.com">Yes,
      this works. Thanks Vassili and Sven. Is there any difference
      between getBytes() and msIO_getStdoutBufferBytes()?
      <br>
      <br>
      On 13/11/2023 09:51, Vassilis Chatzigiannakis via MapServer-users
      wrote:
      <br>
      <blockquote type="cite">Yes, in php using swig it would be:
        <br>
        <br>
        $oImg = $this->oMap->draw();
        <br>
        echo $oImg->getBytes()
        <br>
        <br>
        -----Original Message-----
        <br>
        From: MapServer-users
        <a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users-bounces@lists.osgeo.org"><mapserver-users-bounces@lists.osgeo.org></a> On Behalf Of
        Sven Schroeter via MapServer-users
        <br>
        Sent: Monday, November 13, 2023 10:44 AM
        <br>
        To: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
        <br>
        Subject: Re: [MapServer-users] PHP-Mapscript: write imageObj to
        stdout
        <br>
        <br>
        Hi Jan,
        <br>
        <br>
        maybe you need this:
        <br>
        <br>
                      //SWIG
        <br>
                      if($mapscriptSwig) {
        <br>
                          echo msIO_getStdoutBufferBytes();
        <br>
                      }else{
        <br>
                          echo ms_iogetStdoutBufferBytes();
        <br>
                      }
        <br>
        <br>
        Sven
        <br>
        <br>
        <br>
        Am 10.11.2023 um 18:59 schrieb Jan Hartmann via MapServer-users:
        <br>
        <blockquote type="cite">Hi,
          <br>
          <br>
          In previous versions of PHP-Mapscript there was a function
          <br>
          ImageObj->saveImage(fn), that wrote an ImageObj to a file
          on disk.
          <br>
          When fn was empty, the image was sent to stdout. In
          SWIG-Mapscript,
          <br>
          this function has been replaced by ImageObj->save(fn), but
          fn cannot
          <br>
          be empty anymore. How do I send an ImageObj directly to stdout
          (i.e.
          <br>
          to the browser)?
          <br>
          <br>
          Jan
          <br>
          _______________________________________________
          <br>
          MapServer-users mailing list
          <br>
          <a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
          <br>
          <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
          <br>
        </blockquote>
        <br>
        _______________________________________________
        <br>
        MapServer-users mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
        <br>
        _______________________________________________
        <br>
        MapServer-users mailing list
        <br>
        <a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
        <br>
        <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>