diff --git a/update.py b/update.py index 9319058..47ecbc7 100644 --- a/update.py +++ b/update.py @@ -108,7 +108,11 @@ def main(): sat_img = Image.new("RGBA", sat_img_aplha.size, (255, 255, 255, 255)) sat_img.paste(sat_img_aplha, mask=alpha_chan) - sat_img = scale_to_width(sat_img, 500) + sat_img_width, sat_img_height = sat_img.size + if sat_img_width > sat_img_height: + sat_img = scale_to_width(sat_img, 500) + else: + sat_img = scale_to_height(sat_img, 500) img = Image.new('RGBA', (1280, 1024)) draw = ImageDraw.Draw(img) @@ -127,7 +131,7 @@ def main(): img.paste(waterfall, (0, 0)) img.paste(logo, (water_width + 100, 20)) if sat_img != None: - img.paste(sat_img, (water_width + 100, 500)) + img.paste(sat_img, (water_width + 100, 480)) font = ImageFont.truetype("Montserrat-Regular.otf", FONT_SIZE_SMALL) draw.text((950, 1000), "Geocoding by Nominatim/OSM", TEXT_COLOR, font=font)