<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">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">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <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"><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">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">MapServer 6.4</a> is 90kB, <a href="https://greenwoodmap.com/mapserv76.png" target="_blank">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">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">mapserver-users@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div><br clear="all"><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">www.greenwoodmap.com</a></div></div></div>