<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    A<span class="pl-c1">ctually, I just tried to open mapserv64.png
      with gimp, and export it as a non-interlaced or interlaced PNG.
      And the non-interlaced version is 60 kB vs 96 kB for interlaced.
      So interlacing vs non-interlacing isn't the cause here.</span>
    <p><span class="pl-c1">Looking more closely at </span><span
        class="pl-c1"><span class="pl-c1">mapserv64.png  vs
          mapserv76.png , they are visually different. I suspect the
          rendering to be of higher quality in 7.6 due to anti-aliasing
          and perhaps better quantization to 8-bit. You could perhaps
          try to turn off antialiasing in your CLASS.STYLE. This has
          been re-vived very recently for AGG line rendering. It is
          master only however.<br>
        </span></span></p>
    <div class="moz-cite-prefix">Le 15/05/2021 à 19:07, Richard
      Greenwood a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHBySPZxeKXe-dVLB3tWLSyZm0UiKn7M8NBozVtq+Jg2ARViwA@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">Even,
          <div><br>
          </div>
          <div>Thank you. I had ignored the difference in the
            interlacing of the two images because I didn't think it
            would have affected the size. </div>
          <div><br>
          </div>
          <div>The maprgbapng.c file no longer exists in MapServer 6.4
            or 7.6. There is an "if ( interlaced ..." code block in
            mapoutput.c that is the same in 6.4 and 7.6. I tried forcing
            it ON and rebuilding 7.6 but the output image still is not
            interlaced. Maybe that code is just a left over. Or maybe
            AGG doesn't support interlacing as <a
              href="https://www.mapserver.org/mapfile/outputformat.html"
              moz-do-not-send="true">https://www.mapserver.org/mapfile/outputformat.html</a>
            seems to suggest. <br>
          </div>
          <div><br>
          </div>
          <div>In any case, thanks again.</div>
          <div>Rich</div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Sat, May 15, 2021 at 9:59
            AM Even Rouault <<a
              href="mailto:even.rouault@spatialys.com"
              moz-do-not-send="true">even.rouault@spatialys.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote">
            <div>
              <p>Richard,</p>
              <p>your 6.4 image is a interlaced PNG, whereas the 7.6 is
                a non-interlaced one.</p>
              <p>I see in the git history a relevant commit:</p>
              <p>$ git show 9984b39cc8f74d60eb240728df660a172a118aad<br>
                commit 9984b39cc8f74d60eb240728df660a172a118aad<br>
                Author: Thomas Bonfort <a
                  href="mailto:thomas.bonfort@gmail.com" target="_blank"
                  moz-do-not-send="true"><thomas.bonfort@gmail.com></a><br>
                Date:   Sun Oct 5 15:59:44 2008 +0000<br>
                <br>
                    rgba_png: don't interlace by default<br>
                    <br>
                    <br>
                    git-svn-id: <a
                  href="http://svn.osgeo.org/mapserver/trunk@7960"
                  target="_blank" moz-do-not-send="true">http://svn.osgeo.org/mapserver/trunk@7960</a>
                7532c77e-422f-0410-93f4-f0b67bdd69e2<br>
                <br>
                diff --git a/maprgbapng.c b/maprgbapng.c<br>
                index 105d8d61..c3615edd 100644<br>
                --- a/maprgbapng.c<br>
                +++ b/maprgbapng.c<br>
                @@ -357,10 +357,13 @@ int
                msSaveImageRGBAQuantized(gdImagePtr img, gdIOCtx *ctx,
                outputFormatObj *form<br>
                     int bot_idx, top_idx;<br>
                     int remap[256];<br>
                     int reqcolors = atoi(msGetOutputFormatOption(
                format, "QUANTIZE_COLORS", "256"));<br>
                +    const char *interlace;<br>
                     ms_png_info info;<br>
                     info.width = gdImageSX(img);<br>
                     info.height = gdImageSY(img);<br>
                -    if( strcasecmp("ON", msGetOutputFormatOption(
                format, "INTERLACE", "ON" )) == 0 )<br>
                +    interlace = msGetOutputFormatOption( format,
                "INTERLACE", "OFF" );<br>
                +    if( strcasecmp("ON", interlace) == 0 ||
                strcasecmp("YES", interlace) == 0<br>
                +            || strcasecmp("1", interlace) == 0)<br>
                         info.interlaced=1;<br>
                     else<br>
                         info.interlaced=0;<br>
              </p>
              <p>But this predates 6.4 release by several years, so this
                doesn't explain why you see a different behavior, unless
                something in 6.4 still turned on interlacing on in that
                configuration.<br>
              </p>
              <p>From what I can see in the doc, the interlacing mode
                was removed in the 7.0 release when GD went off, so I
                don't think you can do much. I guess that could be
                re-added but would require some coding.<br>
              </p>
              <p>Even<br>
              </p>
              <p><br>
              </p>
              <div>Le 15/05/2021 à 17:43, Richard Greenwood a écrit :<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">I get significantly different image sizes
                  between MapServer 6.4 and 7.6 with the same output
                  format definition. I've tried many variations of the
                  following.
                  <div><br>
                    <div>OUTPUTFORMAT<br>
                        NAME "png-test"<br>
                        DRIVER "AGG/PNG"  # GD driver is same (6.4 only)<br>
                        MIMETYPE "image/png; mode=8bit"<br>
                        IMAGEMODE PC256<br>
                        FORMATOPTION "QUANTIZE_FORCE=on"<br>
                        FORMATOPTION "QUANTIZE_COLORS=256"<br>
                        EXTENSION "png"<br>
                        # TRANSPARENT on or off makes little difference<br>
                      END</div>
                    <div><br>
                    </div>
                    <div><a
                        href="https://greenwoodmap.com/mapserv64.png"
                        target="_blank" moz-do-not-send="true">MapServer
                        6.4</a> is 90kB, <a
                        href="https://greenwoodmap.com/mapserv76.png"
                        target="_blank" moz-do-not-send="true">MapServer
                        7.6</a> is 320kB. Any suggestions as to how I
                      can get my MapServer 7.6 image sizes down closer
                      to what I'm getting in MapServer 6.4?</div>
                    <div><br>
                    </div>
                    <div>Thanks,</div>
                    <div>Rich</div>
                  </div>
                  <div><br>
                  </div>
                  -- <br>
                  <div dir="ltr">
                    <div dir="ltr">Richard W. Greenwood, PLS<br>
                      <a href="http://www.greenwoodmap.com"
                        target="_blank" moz-do-not-send="true">www.greenwoodmap.com</a></div>
                  </div>
                </div>
                <br>
                <fieldset></fieldset>
                <pre>_______________________________________________
mapserver-users mailing list
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank" moz-do-not-send="true">mapserver-users@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
              </blockquote>
              <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank" moz-do-not-send="true">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
            </div>
          </blockquote>
        </div>
        <br>
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">Richard W. Greenwood, PLS<br>
            <a href="http://www.greenwoodmap.com" target="_blank"
              moz-do-not-send="true">www.greenwoodmap.com</a></div>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>