<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<style>BODY{font:10pt Tahoma, Verdana, sans-serif}</style></head><body>
Hmm, after many experiments, even with nightly build and Pillow, case solved by forcing WMS to:<div><br><div><div> format: image/png</div><div> transparent: true</div><div><br></div><div>And globals to:</div><div><br></div><div><div> formats:</div><div> png24:</div><div> format: image/png</div><div> mode: RGBA</div><div> colors: 0</div><div> transparent: false</div><div> resampling_method: bicubic</div></div><div><br></div><div>Works fine also with:</div><div><br></div><div><div> png8:</div><div> format: image/png</div><div> mode: RGBA</div><div> colors: 256</div><div> resampling_method: bicubic</div><div> encoding_options:</div><div> quantizer: fastoctree</div></div><div><br></div><div>That's really magic. But error</div><div><br></div><div><span style="font-size: 10pt;">File "/usr/local/lib/python2.7/dist-packages/PIL/ImageSupport2.py", line 76, in unpack</span></div><div> raise ValueError(v)</div><div>ValueError: unpack requires a string argument of length 8</div><div><br></div><div>raises from time to time.</div><div><br></div><div>Martin</div><div><br></div><blockquote style="padding-left: 5px; margin-left: 5px; border-left: #0000ff 2px solid; margin-right: 0px"><hr><b>From:</b> Martin Kokeš [mailto:shr3k@typo3-hosting.com]<br><b>To:</b> MapProxy@lists.osgeo.org<br><b>Sent:</b> Sun, 31 Mar 2013 14:06:30 +0200<br><b>Subject:</b> [MapProxy] Output colors always reduced with PNG24 source<br><br>
<font face="Tahoma, Verdana, sans-serif" size="2">Hello list,</font><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><br></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">I have following config (MP 1.5, PIL from Oliver's source<span style="font-size: 10pt;">):</span></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">---</div><div><div><font face="Tahoma, Verdana, sans-serif" size="2">services:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> demo:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> kml:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> tms:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> wmts:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> wms:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> srs: ["EPSG:900913"]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> image_formats: ["image/png"]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">layers:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> - name: test1</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> title: Test with PNG24 source</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> sources: [test1_cache]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> - name: test2</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> title: Test with JPEG source</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> sources: [test2_cache]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">caches:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> test1_cache:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> sources: [test1_wms]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> grids: [global_mercator_osm]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> format: png24</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> cache:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> type: file</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> test2_cache:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> sources: [test2_wms]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> grids: [global_mercator_osm]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> format: png24</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> cache:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> type: file</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">sources:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> test1_wms:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> type: wms</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> req:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> url: <a href="http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get">http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get</a></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> layers: GR_ZM10</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> format: image/png</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> transparent: false</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> coverage:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> bbox: [11.214011580382529, 47.964914601259672, 19.407662623095131, 51.691664934538636]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> srs: 'EPSG:4326'</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> supported_srs: ['EPSG:5514']</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> min_scale: 2.5253813613805272</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> max_scale: 7576144.0841415804</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> http:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> client_timeout: 300</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> test2_wms:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> type: wms</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> req:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> url: <a href="http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get">http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get</a></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> layers: GR_ZM10</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> format: image/jpeg</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> transparent: false</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> coverage:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> bbox: [11.214011580382529, 47.964914601259672, 19.407662623095131, 51.691664934538636]</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> srs: 'EPSG:4326'</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> supported_srs: ['EPSG:5514']</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> min_scale: 2.5253813613805272</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> max_scale: 7576144.0841415804</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> http:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> client_timeout: 300</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">grids:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> global_mercator_osm:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> base: GLOBAL_MERCATOR</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> num_levels: 20</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">globals:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> srs:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> proj_data_dir: "proj_data"</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> image:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> paletted: false</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> formats:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> png24:</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> format: image/png</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> mode: RGB</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> colors: 0</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> transparent: false</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> resampling_method: bicubic</font></div></div><div><font face="Tahoma, Verdana, sans-serif" size="2">---</font></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt;">This is source request for test1:</div><div><font face="Tahoma, Verdana, sans-serif" size="2"><a href="http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get?styles=&format=image%2Fpng&height=1184&bbox=-742076.617816,-1045120.38486,-741052.456103,-1044098.3743&transparent=False&layers=GR_ZM10&service=WMS&width=1186&request=GetMap&srs=EPSG%3A5514&version=1.1.1">http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get?styles=&format=image%2Fpng&height=1184&bbox=-742076.617816,-1045120.38486,-741052.456103,-1044098.3743&transparent=False&layers=GR_ZM10&service=WMS&width=1186&request=GetMap&srs=EPSG%3A5514&version=1.1.1</a></font></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><br></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">Sometimes I become this error:</div><div><div><font face="Tahoma, Verdana, sans-serif" size="2">[2013-03-31 13:59:19,391] mapproxy.wsgiapp - CRITICAL - fatal error in tms for /tms/1.0.0/test1_EPSG900913/16/70795/86663.png</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">Traceback (most recent call last):</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/wsgiapp.py", line 166, in __call__</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> resp = self.handlers[handler_name].handle(req)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/base.py", line 30, in handle</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return handler(parsed_req)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/tile.py", line 74, in map</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> tile = layer.render(tile_request, use_profiles=tile_request.use_profiles, coverage=limit_to)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/tile.py", line 265, in render</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> tile = self.tile_manager.load_tile_coord(tile_coord, with_metadata=True)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 105, in load_tile_coord</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> created_tiles = creator.create_tiles([tile])</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 227, in create_tiles</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> created_tiles = self._create_meta_tiles(meta_tiles)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 300, in _create_meta_tiles</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> created_tiles.extend(self._create_meta_tile(meta_tile))</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 309, in _create_meta_tile</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> meta_tile_image = self._query_sources(query)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 274, in _query_sources</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return self.sources[0].get_map(query)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/source/wms.py", line 62, in get_map</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> resp = self._get_map(query)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/source/wms.py", line 81, in _get_map</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return self._get_transformed(query, format)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/source/wms.py", line 124, in _get_transformed</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> query.size, dst_bbox, self.image_opts)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/image/transform.py", line 91, in transform</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> result = self._transform(src_img, src_bbox, dst_size, dst_bbox, image_opts)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/image/transform.py", line 156, in _transform</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> image_filter[image_opts.resampling])</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1629, in transform</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> im.__transformer(box, self, QUAD, quad, resample, fill)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1674, in __transformer</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> image.load()</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 212, in load</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> s = read(self.decodermaxblock)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py", line 401, in load_read</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> cid, pos, len = self.png.read()</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py", line 93, in read</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> len, cid = self.fp.get("!I4s")</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/ImageSupport2.py", line 105, in get</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return self.read(struct.calcsize(fmt)).unpack(fmt)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/ImageSupport2.py", line 76, in unpack</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> raise ValueError(v)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">ValueError: unpack requires a string argument of length 8</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">Traceback (most recent call last):</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/wsgiapp.py", line 166, in __call__</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> resp = self.handlers[handler_name].handle(req)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/base.py", line 30, in handle</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return handler(parsed_req)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/tile.py", line 74, in map</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> tile = layer.render(tile_request, use_profiles=tile_request.use_profiles, coverage=limit_to)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/service/tile.py", line 265, in render</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> tile = self.tile_manager.load_tile_coord(tile_coord, with_metadata=True)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 105, in load_tile_coord</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> created_tiles = creator.create_tiles([tile])</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 227, in create_tiles</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> created_tiles = self._create_meta_tiles(meta_tiles)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 300, in _create_meta_tiles</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> created_tiles.extend(self._create_meta_tile(meta_tile))</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 309, in _create_meta_tile</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> meta_tile_image = self._query_sources(query)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/cache/tile.py", line 274, in _query_sources</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return self.sources[0].get_map(query)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/source/wms.py", line 62, in get_map</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> resp = self._get_map(query)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/source/wms.py", line 81, in _get_map</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return self._get_transformed(query, format)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/source/wms.py", line 124, in _get_transformed</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> query.size, dst_bbox, self.image_opts)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/image/transform.py", line 91, in transform</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> result = self._transform(src_img, src_bbox, dst_size, dst_bbox, image_opts)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/mapproxy/image/transform.py", line 156, in _transform</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> image_filter[image_opts.resampling])</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1629, in transform</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> im.__transformer(box, self, QUAD, quad, resample, fill)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 1674, in __transformer</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> image.load()</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 212, in load</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> s = read(self.decodermaxblock)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py", line 401, in load_read</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> cid, pos, len = self.png.read()</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/PngImagePlugin.py", line 93, in read</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> len, cid = self.fp.get("!I4s")</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/ImageSupport2.py", line 105, in get</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> return self.read(struct.calcsize(fmt)).unpack(fmt)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> File "/usr/local/lib/python2.7/dist-packages/PIL/ImageSupport2.py", line 76, in unpack</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"> raise ValueError(v)</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">ValueError: unpack requires a string argument of length 8</font></div></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><br></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">...but second request gets through.</div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"><br></div><div style="font-family: Tahoma, Verdana, sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">This is source request for test2:</div><div><font face="Tahoma, Verdana, sans-serif" size="2"><a href="http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get?styles=&format=image%2Fjpeg&height=1184&bbox=-742076.617816,-1045120.38486,-741052.456103,-1044098.3743&transparent=False&layers=GR_ZM10&service=WMS&width=1186&request=GetMap&srs=EPSG%3A5514&version=1.1.1">http://geoportal.cuzk.cz/WMS_ZM10_PUB/service.svc/get?styles=&format=image%2Fjpeg&height=1184&bbox=-742076.617816,-1045120.38486,-741052.456103,-1044098.3743&transparent=False&layers=GR_ZM10&service=WMS&width=1186&request=GetMap&srs=EPSG%3A5514&version=1.1.1</a></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">Results are 256 color PNG in test1 (transformed looks not very well), and 16M color PNG in test2 (looks nice).</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">Is there other way to force MapProxy to work always in 24 bit with PNG24 source?</font></div><div><font face="Tahoma, Verdana, sans-serif" size="2"><br></font></div><div><font face="Tahoma, Verdana, sans-serif" size="2">Martin</font></div>
</blockquote><style>
BODY {font:10pt Tahoma,Verdana,sans-serif}
</style>
</div></div></body></html>