[MapProxy] cache image quality
Markus Untera
markus.untera at gmail.com
Wed Mar 22 02:08:35 PDT 2017
Hi
Maybe someone can help. I cant’t get jpeg_quality to make any difference.
I have set the option directly to the cache and even as global option, but file size is still the same.
Peeking into Python code I see that only place where image conversion is taking place is inside mapproxy/image/_init_.py file in class ImageSource which has function img_to_buf(), but this function is never touched in my case.
Am I doing something wrong?
My conf is like that:
caches:
my_final_cache:
format: image/jpeg
image:
encoding_options:
jpeg_quality: 50
grids: [my_grid]
sources: [tile_cache,wms_cache]
cache:
type: file
directory: /custom/location/
tile_lock_dir: /custom/location/tile_locks/
tile_cache:
format: image/jpeg
grids: [my_grid]
sources: [tile_source]
meta_size: [1,1]
meta_buffer: 0
wms_cache:
format: image/jpeg
grids: [my_grid]
sources: [wms_source]
meta_size: [1,1]
meta_buffer: 0
_
sources:
tile_source:
type: tile
url: http://url/%(tms_path)s.jpg
grid: [my_grid]
max_res: 0.48828125
wms_source:
type: wms
req:
url: http://wmsurl?
layers: wmslayer
min_res: 0.244140625
Best Regards,
Markus Untera
More information about the MapProxy
mailing list