<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Just</p>
    <p>Thanks for an answer.<br>
    </p>
    <p>I've tried this... trouble is that wherever I link this format
      (service, layer, cache, source) it goes only into <br>
    </p>
    <p> </p>
    <blockquote type="cite"><Capability> <br>
        <Request> <br>
      ...<br>
          <GetMap> <br>
              <Format>image/png</Format> <br>
              <b><Format>image/png8</Format> </b></blockquote>
    And I need it in to be in layer, here:<br>
    <br>
    <blockquote type="cite">  <VendorSpecificCapabilities>
      <br>
          <TileSet>
      <br>
            <SRS>EPSG:2180</SRS>
      <br>
            <BoundingBox SRS="EPSG:2180" minx="144907.165815"
      miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
      />
      <br>
            <Resolutions>3052.76558426 1526.38279213 763.191396066
      381.595698033 190.797849016 95.3989245082 47.6994622541
      23.8497311271 11.9248655635 5.96243278176 2.98121639088
      1.49060819544 0.745304097721 0.37265204886 </Resolutions>
      <br>
            <Width>256</Width>
      <br>
            <Height>256</Height>
      <br>
            <b><Format>image/png</Format>
      </b><br>
            <Layers>osm:Mapa_active</Layers>
      <br>
            <Styles></Styles>
      <br>
          </TileSet>
    </blockquote>
    As for now I made some ugly hack and modified templates of
    capabilities... works, but it's ugly and looking for some nicer way
    to do this.<br>
    <br>
    <br>
    <br>
    <p><br>
    </p>
    <pre class="moz-signature" cols="72">Pozdrawiam
Andrzej Kępys
gg: 7918247
skype: jedrus305
tel: 605 997 440 </pre>
    <div class="moz-cite-prefix">W dniu 2018-06-29 o 13:18, Just van den
      Broecke pisze:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1b0cd9ad-8edc-5692-f9d7-5b8b451eeb4c@justobjects.nl">Hi
      Andrzej,
      <br>
      <br>
      I use png8 as well, but a slightly different config under
      "globals":
      <br>
      <br>
        image:
      <br>
          # resampling_method: nearest
      <br>
          resampling_method: bilinear
      <br>
          paletted: true
      <br>
          formats:
      <br>
            png8:
      <br>
              format: image/png
      <br>
              colors: 256
      <br>
      <br>
      Note: you use format: image/png8...
      <br>
      <br>
      Best,
      <br>
      <br>
      Just
      <br>
      <br>
      On 29-06-18 12:23, Andrzej Kępys wrote:
      <br>
      <blockquote type="cite">Hi All.
        <br>
        <br>
        I Have a little problem with configuration - any help
        appreciated.
        <br>
        <br>
        I have to replace my existing web map servers with something
        else - so I choose mapproxy and I'm very pleased of it's
        efficiency and simplicity - it's working perfect, but... trouble
        is that new servers have to work exactly the same as an old ones
        - have to provide the same layers, with the same names, formats
        and other properties, because I have about 500 fat-client
        applications and I need to avoid replacing them all.
        <br>
        <br>
        As for now lots of work is done - I made mapnik backend (source,
        cache) in local srs for Poland (2180) and I'm serving them with
        wms tiled - everything work, but last thing I have to do is to
        serve layers in format 'image/png8' because all applications
        expects this format. I found few snippets on the web, but no
        luck as for now... I have 'image/png8' in overall wms
        properties, but I need them in tilesets properties also...
        <br>
        <br>
        My config and capabilities document below - any help appreciated
        <br>
        <br>
        <blockquote type="cite"># -------------------------------
          <br>
          # MapProxy example configuration.
          <br>
          # -------------------------------
          <br>
          #
          <br>
          # This is a minimal MapProxy configuration.
          <br>
          # See full_example.yaml and the documentation for more
          options.
          <br>
          #
          <br>
          <br>
          # Starts the following services:
          <br>
          # Demo:
          <br>
          #     <a class="moz-txt-link-freetext" href="http://localhost:8080/demo">http://localhost:8080/demo</a>
          <br>
          # WMS:
          <br>
          #     capabilities:
          <a class="moz-txt-link-freetext" href="http://localhost:8080/service?REQUEST=GetCapabilities">http://localhost:8080/service?REQUEST=GetCapabilities</a>
          <br>
          # WMTS:
          <br>
          #     capabilities:
          <a class="moz-txt-link-freetext" href="http://localhost:8080/wmts/1.0.0/WMTSCapabilities.xml">http://localhost:8080/wmts/1.0.0/WMTSCapabilities.xml</a>
          <br>
          #     first tile:
          <a class="moz-txt-link-freetext" href="http://localhost:8080/wmts/osm/webmercator/0/0/0.png">http://localhost:8080/wmts/osm/webmercator/0/0/0.png</a>
          <br>
          # Tile service (compatible with OSM/etc.)
          <br>
          #     first tile:
          <a class="moz-txt-link-freetext" href="http://localhost:8080/tiles/osm/webmercator/0/0/0.png">http://localhost:8080/tiles/osm/webmercator/0/0/0.png</a>
          <br>
          # TMS:
          <br>
          #     note: TMS is not compatible with OSM/Google Maps/etc.
          <br>
          #     fist tile:
          <a class="moz-txt-link-freetext" href="http://localhost:8080/tms/1.0.0/osm/webmercator/0/0/0.png">http://localhost:8080/tms/1.0.0/osm/webmercator/0/0/0.png</a>
          <br>
          # KML:
          <br>
          #     initial doc: <a class="moz-txt-link-freetext" href="http://localhost:8080/kml/osm/webmercator">http://localhost:8080/kml/osm/webmercator</a>
          <br>
          <br>
          services:
          <br>
            demo:
          <br>
            tms:
          <br>
              use_grid_names: true
          <br>
              # origin for /tiles service
          <br>
              origin: 'nw'
          <br>
            kml:
          <br>
                use_grid_names: true
          <br>
            wmts:
          <br>
            wms:
          <br>
              srs: ['EPSG:4326', 'EPSG:900913', 'EPSG:3857',
          'EPSG:2180']
          <br>
              image_formats: ['image/png', png8]
          <br>
              md:
          <br>
                title: MapProxy WMS Proxy
          <br>
                abstract: This is a minimal MapProxy example.
          <br>
          <br>
          layers:
          <br>
            - name: "osm:Mapa_active"
          <br>
              title: Mapa podstawowa
          <br>
              sources: [m_base_cache]
          <br>
              image_formats: ['image/png', png8]
          <br>
            - name: "osm:Hydranty_active"
          <br>
              title: Mapa podstawowa
          <br>
              sources: [m_emergency_cache]
          <br>
              image_formats: ['image/png', png8]
          <br>
            - name: "osm:Rejony_operacyjne_active"
          <br>
              title: Mapa podstawowa
          <br>
              sources: [m_regions_cache]
          <br>
              image_formats: ['image/png', png8]
          <br>
          <br>
          caches:
          <br>
            m_base_cache:
          <br>
              grids: [puwg]
          <br>
              sources: [mapnik_base]
          <br>
              image_formats: ['image/png', png8, 'image/tiff']
          <br>
            m_emergency_cache:
          <br>
              grids: [puwg]
          <br>
              sources: [mapnik_emergency]
          <br>
              image_formats: ['image/png', png8]
          <br>
            m_regions_cache:
          <br>
              grids: [puwg]
          <br>
              sources: [mapnik_regions]
          <br>
              image_formats: ['image/png', png8]
          <br>
          <br>
          sources:
          <br>
            mapnik_base:
          <br>
              type: mapnik
          <br>
              mapfile: /srv/mapnik_2180/base_2180.xml
          <br>
              image_formats: ['image/png', png8]
          <br>
            mapnik_emergency:
          <br>
              type: mapnik
          <br>
              mapfile: /srv/mapnik_2180/emergency_2180.xml
          <br>
              transparent: True
          <br>
              image_formats: ['image/png', png8]
          <br>
            mapnik_regions:
          <br>
              type: mapnik
          <br>
              mapfile: /srv/mapnik_2180/regions_2180.xml
          <br>
              transparent: True
          <br>
              image_formats: ['image/png', png8]
          <br>
          <br>
          <br>
          grids:
          <br>
              webmercator:
          <br>
                  base: GLOBAL_WEBMERCATOR
          <br>
              puwg:
          <br>
                  srs: EPSG:2180
          <br>
                  bbox: [144907.16581514146, 129171.69217334315,
          926415.1553865769, 910679.6817447785]
          <br>
                  bbox_srs: EPSG:2180
          <br>
                  res: [3052.7655842634194, 1526.3827921317097,
          763.1913960658549, 381.59569803292743, 190.79784901646372,
          95.39892450823186, 47.69946225411593, 23.849731127057964,
          11.924865563528982, 5.962432781764491, 2.9812163908822455,
          1.49060
          <br>
          <br>
          <br>
          <br>
          globals:
          <br>
            image:
          <br>
              # resampling: 'bicubic'
          <br>
              paletted: true
          <br>
              formats:
          <br>
                custom:
          <br>
                  format: image/jpeg
          <br>
                png8:
          <br>
                  format: image/png8
          <br>
                  colors: 256
          <br>
        </blockquote>
        --------------------------
        <br>
        <br>
        <blockquote type="cite"><?xml version="1.0"?>
          <br>
          <!DOCTYPE WMT_MS_Capabilities SYSTEM
          <a class="moz-txt-link-rfc2396E" href="http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd">"http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd"</a>
          <br>
           [
          <br>
           <!ELEMENT VendorSpecificCapabilities (TileSet*) >
          <br>
           <!ELEMENT TileSet (SRS, BoundingBox?, Resolutions, Width,
          Height, Format, Layers*, Styles*) >
          <br>
           <!ELEMENT Resolutions (#PCDATA) >
          <br>
           <!ELEMENT Width (#PCDATA) >
          <br>
           <!ELEMENT Height (#PCDATA) >
          <br>
           <!ELEMENT Layers (#PCDATA) >
          <br>
           <!ELEMENT Styles (#PCDATA) >
          <br>
           ]>  <!-- end of DOCTYPE declaration -->
          <br>
          <WMT_MS_Capabilities version="1.1.1">
          <br>
          <Service>
          <br>
            <Name>OGC:WMS</Name>
          <br>
            <Title>MapProxy WMS Proxy</Title>
          <br>
            <Abstract>This is a minimal MapProxy
          example.</Abstract>
          <br>
            <OnlineResource
          xmlns:xlink=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
          xlink:href=<a class="moz-txt-link-rfc2396E" href="http://mapabkp.abakus.net.pl:8090/service">"http://mapabkp.abakus.net.pl:8090/service"</a>/>
          <br>
            <Fees>none</Fees>
          <br>
            <AccessConstraints>none</AccessConstraints>
          <br>
          </Service>
          <br>
          <Capability>
          <br>
            <Request>
          <br>
              <GetCapabilities>
          <br>
                <Format>application/vnd.ogc.wms_xml</Format>
          <br>
                <DCPType>
          <br>
                  <HTTP>
          <br>
                    <Get><OnlineResource
          xmlns:xlink=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
          xlink:href=<a class="moz-txt-link-rfc2396E" href="http://mapabkp.abakus.net.pl:8090/service?">"http://mapabkp.abakus.net.pl:8090/service?"</a>/></Get>
          <br>
                  </HTTP>
          <br>
                </DCPType>
          <br>
              </GetCapabilities>
          <br>
              <GetMap>
          <br>
                  <Format>image/png</Format>
          <br>
                  <Format>image/png8</Format>
          <br>
                <DCPType>
          <br>
                  <HTTP>
          <br>
                    <Get><OnlineResource
          xmlns:xlink=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
          xlink:href=<a class="moz-txt-link-rfc2396E" href="http://mapabkp.abakus.net.pl:8090/service?">"http://mapabkp.abakus.net.pl:8090/service?"</a>/></Get>
          <br>
                  </HTTP>
          <br>
                </DCPType>
          <br>
              </GetMap>
          <br>
              <GetFeatureInfo>
          <br>
                <Format>text/plain</Format>
          <br>
                <Format>text/html</Format>
          <br>
                <Format>application/vnd.ogc.gml</Format>
          <br>
                <DCPType>
          <br>
                  <HTTP>
          <br>
                    <Get><OnlineResource
          xmlns:xlink=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
          xlink:href=<a class="moz-txt-link-rfc2396E" href="http://mapabkp.abakus.net.pl:8090/service?">"http://mapabkp.abakus.net.pl:8090/service?"</a>/></Get>
          <br>
                  </HTTP>
          <br>
                </DCPType>
          <br>
              </GetFeatureInfo>
          <br>
            </Request>
          <br>
            <Exception>
          <br>
              <Format>application/vnd.ogc.se_xml</Format>
          <br>
             
          <Format>application/vnd.ogc.se_inimage</Format>
          <br>
              <Format>application/vnd.ogc.se_blank</Format>
          <br>
            </Exception>
          <br>
            <VendorSpecificCapabilities>
          <br>
              <TileSet>
          <br>
                <SRS>EPSG:2180</SRS>
          <br>
                <BoundingBox SRS="EPSG:2180" minx="144907.165815"
          miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
          />
          <br>
                <Resolutions>3052.76558426 1526.38279213
          763.191396066 381.595698033 190.797849016 95.3989245082
          47.6994622541 23.8497311271 11.9248655635 5.96243278176
          2.98121639088 1.49060819544 0.745304097721 0.37265204886
          </Resolutions>
          <br>
                <Width>256</Width>
          <br>
                <Height>256</Height>
          <br>
                <Format>image/png</Format>
          <br>
                <Layers>osm:Mapa_active</Layers>
          <br>
                <Styles></Styles>
          <br>
              </TileSet>
          <br>
              <TileSet>
          <br>
                <SRS>EPSG:2180</SRS>
          <br>
                <BoundingBox SRS="EPSG:2180" minx="144907.165815"
          miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
          />
          <br>
                <Resolutions>3052.76558426 1526.38279213
          763.191396066 381.595698033 190.797849016 95.3989245082
          47.6994622541 23.8497311271 11.9248655635 5.96243278176
          2.98121639088 1.49060819544 0.745304097721 0.37265204886
          </Resolutions>
          <br>
                <Width>256</Width>
          <br>
                <Height>256</Height>
          <br>
                <Format>image/png</Format>
          <br>
                <Layers>osm:Hydranty_active</Layers>
          <br>
                <Styles></Styles>
          <br>
              </TileSet>
          <br>
              <TileSet>
          <br>
                <SRS>EPSG:2180</SRS>
          <br>
                <BoundingBox SRS="EPSG:2180" minx="144907.165815"
          miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
          />
          <br>
                <Resolutions>3052.76558426 1526.38279213
          763.191396066 381.595698033 190.797849016 95.3989245082
          47.6994622541 23.8497311271 11.9248655635 5.96243278176
          2.98121639088 1.49060819544 0.745304097721 0.37265204886
          </Resolutions>
          <br>
                <Width>256</Width>
          <br>
                <Height>256</Height>
          <br>
                <Format>image/png</Format>
          <br>
               
          <Layers>osm:Rejony_operacyjne_active</Layers>
          <br>
                <Styles></Styles>
          <br>
              </TileSet>
          <br>
            </VendorSpecificCapabilities>
          <br>
            <Layer>
          <br>
              <Title>MapProxy WMS Proxy</Title>
          <br>
              <SRS>EPSG:4326</SRS>
          <br>
              <SRS>EPSG:900913</SRS>
          <br>
              <SRS>EPSG:3857</SRS>
          <br>
              <SRS>EPSG:2180</SRS>
          <br>
              <LatLonBoundingBox minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
              <BoundingBox SRS="EPSG:900913" minx="1481888.89571"
          miny="6255042.14171" maxx="2874501.34141" maxy="7569722.22253"
          />
          <br>
              <BoundingBox SRS="EPSG:4326" minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
              <BoundingBox SRS="EPSG:3857" minx="1481888.89571"
          miny="6255042.14171" maxx="2874501.34141" maxy="7569722.22253"
          />
          <br>
              <Layer>
          <br>
                <Name>osm:Mapa_active</Name>
          <br>
                <Title>Mapa podstawowa</Title>
          <br>
                <LatLonBoundingBox minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
                <BoundingBox SRS="EPSG:900913" minx="1481888.89571"
          miny="6255042.14155" maxx="2874501.34141" maxy="7569722.22236"
          />
          <br>
                <BoundingBox SRS="EPSG:4326" minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
                <BoundingBox SRS="EPSG:3857" minx="1481888.89571"
          miny="6255042.14155" maxx="2874501.34141" maxy="7569722.22236"
          />
          <br>
                <BoundingBox SRS="EPSG:2180" minx="144907.165815"
          miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
          />
          <br>
              </Layer>
          <br>
              <Layer>
          <br>
                <Name>osm:Hydranty_active</Name>
          <br>
                <Title>Mapa podstawowa</Title>
          <br>
                <LatLonBoundingBox minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
                <BoundingBox SRS="EPSG:900913" minx="1481888.89571"
          miny="6255042.14155" maxx="2874501.34141" maxy="7569722.22236"
          />
          <br>
                <BoundingBox SRS="EPSG:4326" minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
                <BoundingBox SRS="EPSG:3857" minx="1481888.89571"
          miny="6255042.14155" maxx="2874501.34141" maxy="7569722.22236"
          />
          <br>
                <BoundingBox SRS="EPSG:2180" minx="144907.165815"
          miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
          />
          <br>
              </Layer>
          <br>
              <Layer>
          <br>
                <Name>osm:Rejony_operacyjne_active</Name>
          <br>
                <Title>Mapa podstawowa</Title>
          <br>
                <LatLonBoundingBox minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
                <BoundingBox SRS="EPSG:900913" minx="1481888.89571"
          miny="6255042.14155" maxx="2874501.34141" maxy="7569722.22236"
          />
          <br>
                <BoundingBox SRS="EPSG:4326" minx="13.3120344438"
          miny="48.8830586734" maxx="25.8220848921" maxy="56.0567547244"
          />
          <br>
                <BoundingBox SRS="EPSG:3857" minx="1481888.89571"
          miny="6255042.14155" maxx="2874501.34141" maxy="7569722.22236"
          />
          <br>
                <BoundingBox SRS="EPSG:2180" minx="144907.165815"
          miny="129171.692173" maxx="926415.155387" maxy="910679.681745"
          />
          <br>
              </Layer>
          <br>
            </Layer>
          <br>
          </Capability>
          <br>
          </WMT_MS_Capabilities>
          <br>
        </blockquote>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
      </blockquote>
      _______________________________________________
      <br>
      MapProxy mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:MapProxy@lists.osgeo.org">MapProxy@lists.osgeo.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapproxy">https://lists.osgeo.org/mailman/listinfo/mapproxy</a><br>
    </blockquote>
    <br>
  <div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
        <tr>
                <td style='border:none;padding:0px 15px 0px 8px'>
                        <a href="https://www.avast.com/antivirus">
                                <img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
                        </a>
                </td>
                <td>
                        <p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
                                Ta wiadomość została sprawdzona na obecność wirusów przez oprogramowanie antywirusowe Avast.
                                <br><a href="https://www.avast.com/antivirus">www.avast.com</a>
                        </p>
                </td>
        </tr>
</table>
<br />
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>