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 layer broken #2971

Open
Groxot opened this issue Jun 30, 2023 · 2 comments
Open

Image layer broken #2971

Groxot opened this issue Jun 30, 2023 · 2 comments

Comments

@Groxot
Copy link

Groxot commented Jun 30, 2023

Image layer shows or does not show the picture or shows part of it

Using latest docker container https://hub.docker.com/r/camptocamp/mapfish_print

  • MapFish print version: 3.29
  • Java version: ?
  • OS: linux

Config files

config.yaml

templates:
  #===========================================================================
  A4 landscape: !template
    #===========================================================================
    reportTemplate: simpleReport.jrxml
    attributes:
      title: !string
        default: 'FEFEFEFEFEF'
      map: !map
        maxDpi: 700
        width: 780
        height: 330
    processors:
      - !reportBuilder # compile all reports in current directory
        directory: '.'
      - !configureHttpRequests
        httpProcessors:
          - !restrictUris
            matchers:
              - !acceptAll {}
      - !createMap { }

requestData.json

{
  "layout": "A4 landscape",
  "attributes": {"map": {
    "scale": 550000,
    "projection": "EPSG:3857",
    "dpi": 200,
    "center": [669970.5529195699, 5298232.615586995],
    "rotation": "0",
    "layers": [
      {
        "extent": [
          669970.5529195699, 5298232.615586995,
          710329.3038541381, 5338591.366521563
        ],
        "baseURL": "https://imgtr.ee/images/2023/06/30/8c7df9828c7edd5b81a26e9dba9c3c19.png",
        "name": "image_static",
        "opacity": 0.8,
        "type": "image"
      },
      {
        "baseURL": "http://a.tile.openstreetmap.org/",
        "tileSize": [256,256],
        "resolutions": [
          156543.03390625,
          78271.516953125,
          39135.758475,
          19567.8792375,
          9783.93961875,
          4891.969809375,
          2445.9849046875,
          1222.99245256282,
          611.496226171875,
          305.7481130859375,
          152.87405654296876,
          76.43702827148438,
          38.21851413574219,
          19.109257067871095,
          9.554628533935547,
          4.777314266967774,
          2.388657133483887,
          1.1943285667419434,
          0.5971642833709717,
          0.41999977320012255,
          0.2799998488000817,
          0.13999992440004086,
          0.08399995464002451,
          0.05599996976001634,
          0.02799998488000817
        ],
        "opacity": 0.9,
        "type": "OSM",
        "maxExtent": [
          -20037508.3392,
          -20037508.3392,
          20037508.3392,
          20037508.3392
        ]
      }
    ]
  }}
}

Works great:
image

But if we changing center point to 710329.3038541381, 5338591.366521563:
image

Also if we change dpi or scale or opacity image will not work:
original config + dpi = 300 ( part of image )
image
original config + scale = 850000 ( no image )
image

original config + opacity both layers = 1 ( works great )
image
original config + OSM opacity = 1 , image opacity = 0.8 ( no image )
image

@sebr72
Copy link
Contributor

sebr72 commented Jul 17, 2023

Hi, I generated Release 3.30.5. Could you please check if you can still reproduce the problem ?
FYI: It is a Java 8 build, which can run inside a jdk 11 tomcat (But not 17).

@reed-tom
Copy link

Having a similar issue when setting an opacity on an image layer, colors seem to skew when opacity is anything but 1.
Original
original_image

50% opacity
50_percent_opacity

Same result on 3.30.3 and 3.30.5

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