Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image tile format jpeg doesn't work #754

Open
mar0321 opened this issue Oct 5, 2023 · 2 comments
Open

Image tile format jpeg doesn't work #754

mar0321 opened this issue Oct 5, 2023 · 2 comments

Comments

@mar0321
Copy link

mar0321 commented Oct 5, 2023

Hi,
i'm seeding compact bundle cache (ArcGIS) and i want to try jpeg instead of png
but no matter what tiles are stored in png anyway.

my code is in yaml is:

image:
format: image/jpeg
image:
encoding_options:
jpeg_quality: 80

and it still provide png tiles.
Isn't there a bug? Or what am i doing wrong?

I have maproxy version 1.12.0 and 1.13.2

Thank's for response
Jan

@CaptainInler
Copy link

I also find this a bit strange as https://mapproxy.org/docs/latest/configuration.html#format states:

The internal image format for the cache. Available options are image/png, image/jpeg etc.

I was not able to makte this working but only when disabling format: image/jpeg. But then the tiles will get stored as png.

For example with this yaml:

services:
  demo:
  tms:
    use_grid_names: true
    origin: 'nw'

layers:
  - name: swisstopo-swissimage
    title: swisstopo-swissimage
    sources: [swisstopo-swissimage_cache]

caches:
  swisstopo-swissimage_cache:
    grids: [webmercator]
    sources: [swissimage_src]
    #format: image/jpeg
    cache:
      type: file
      directory: C:/swissimage
      directory_layout: tms

sources:
  swissimage_src:
    type: tile
    grid: GLOBAL_WEBMERCATOR
    url: https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage/default/current/3857/%(tms_path)s.jpeg
    coverage:
      bbox: [5.140242, 45.398181, 11.47757, 48.230651]
      srs: 'EPSG:4326'

grids:
  webmercator:
    base: GLOBAL_WEBMERCATOR

With format: image/jpeg enabled, there are no tiles stored in the cache-directory at all.

@kom177
Copy link

kom177 commented Dec 25, 2023

Did you install all required dependencies as described in https://mapproxy.github.io/mapproxy/install.html#dependencies-pil ?
BTW, Mapproxy versions 1.12-1.13 are extremely outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants