Skip to content

Commit

Permalink
Merge pull request #2616 from camptocamp/backport/2615-to-master
Browse files Browse the repository at this point in the history
[Backport master] Fix for legend image with no images
  • Loading branch information
sbrunner authored Nov 30, 2024
2 parents 6e6f174 + 1e551df commit e16c82c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tilecloud_chain/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ def _generate_legend_images(gene: TileGeneration) -> None:
response.content,
exc_info=True,
)
width = max(i.size[0] for i in legends) if legends else 0
height = sum(i.size[1] for i in legends) if legends else 0
width = max(1, max(i.size[0] for i in legends) if legends else 0)
height = max(1, sum(i.size[1] for i in legends) if legends else 0)
image = Image.new("RGBA", (width, height))
y = 0
for i in legends:
Expand Down

0 comments on commit e16c82c

Please sign in to comment.