<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Times New Roman, Times, serif">I see. Just for
      curiosity: why was png/gd dropped and wouldn't it be an idea to
      add an option to generate automatically a palette for png 8?
      Paletted output is still very useful for choropleth maps. <br>
      <br>
      Jan </font><br>
    <br>
    On 01/03/2012 04:05 PM, Lime, Steve D (DNR) wrote:
    <blockquote
cite="mid:C549F0496453D842B4DD71AC8188DDC506169F@055-CH1MPN1-041.055d.mgd.msft.net"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:767114877;
        mso-list-type:hybrid;
        mso-list-template-ids:1002477748 25167138 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:22.5pt;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">GD
            is for GIF only in 6.0+. To get paletted output you can set:<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoListParagraph"
          style="margin-left:22.5pt;text-indent:-.25in;mso-list:l0
          level1 lfo1">
          <!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span
              style="mso-list:Ignore">-<span style="font:7.0pt
                "Times New Roman"">         
              </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">IMAGETYPE
            GIF (GD-based)<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="margin-left:22.5pt;text-indent:-.25in;mso-list:l0
          level1 lfo1">
          <!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span
              style="mso-list:Ignore">-<span style="font:7.0pt
                "Times New Roman"">         
              </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">IMAGETYPE
            PNG (AGG 8-bit)<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="margin-left:22.5pt;text-indent:-.25in;mso-list:l0
          level1 lfo1">
          <!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span
              style="mso-list:Ignore">-<span style="font:7.0pt
                "Times New Roman"">         
              </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Setup
            an output format with like Rich G. mentioned<o:p></o:p></span></p>
        <p class="MsoListParagraph"
          style="margin-left:22.5pt;text-indent:-.25in;mso-list:l0
          level1 lfo1">
          <!--[if !supportLists]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span
              style="mso-list:Ignore">-<span style="font:7.0pt
                "Times New Roman"">         
              </span></span></span><!--[endif]--><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Setup
            an output format that forces use of a pre-defined palette<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">OUTPUTFORMAT<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            NAME png8<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            DRIVER "AGG/PNG"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            MIMETYPE "image/png"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            IMAGEMODE RGB<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            EXTENSION "png"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            FORMATOPTION "INTERLACE=OFF"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            FORMATOPTION "PALETTE_FORCE=TRUE"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">   
            FORMATOPTION
            "PALETTE=/usr/local/mapserver/apps/mr/compass/compass.palette"<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">END<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Steve<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
                <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
                <b>On Behalf Of </b>Jan Hartmann<br>
                <b>Sent:</b> Monday, January 02, 2012 10:45 AM<br>
                <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
                <b>Subject:</b> [mapserver-users] Can't get 8-bit
                palette output<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Happy New Year, all.<br>
          <br>
          I'm porting my applications from MapServer 5.7 to 6.0.1, and I
          am unable to get 8-bit palette output. The MapScript commands
          are:<br>
          <br>
              $oMap->outputformat->set('driver','GD/PNG');<br>
             
          $oMap->outputformat->set('imagemode',MS_IMAGEMODE_PC256);<br>
          <br>
          which give me the following warning, and no image:<br>
          <br>
          <b>Warning</b>: mapObj::draw() [<a moz-do-not-send="true"
            href="http://mapserver.sara.nl/calligo/zl/maps/k1832/mapobj.draw">mapobj.draw</a>]:
          [MapServer Error]: agg2CreateImage(): AGG2 driver only
          supports RGB or RGBA pixel models<br>
          <br>
          I tried every combination I coud think of, with GIF and GDAL,
          and got always the same result. MapServer was compiled with
          gd-support:<br>
          <br>
          MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
          SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
          SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
          SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=THREADS
          SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL
          INPUT=SHAPEFILE<br>
          <br>
          Any idea, someone?<br>
          <br>
          Jan<o:p></o:p></p>
      </div>
    </blockquote>
  </body>
</html>