summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/controller.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_api/controllers/controller.py')
-rw-r--r--indoteknik_api/controllers/controller.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/indoteknik_api/controllers/controller.py b/indoteknik_api/controllers/controller.py
index 0592afe1..a362e6a6 100644
--- a/indoteknik_api/controllers/controller.py
+++ b/indoteknik_api/controllers/controller.py
@@ -230,16 +230,6 @@ class Controller(http.Controller):
new_img = img
- if version == '2':
- logo__footer_path = get_module_resource('indoteknik_api', 'static', 'src', 'images', 'logo-indoteknik-footer.png')
- logo__footer_img = Image.open(logo__footer_path).convert('RGBA')
- logo__footer_img.thumbnail((img_width, img_height // 1))
- logo_footer_w, logo_footer_h = logo__footer_img.size
- new_img.paste(logo__footer_img, (0, img_height - logo_footer_h), logo__footer_img)
-
- logo_img_w = img_width // 1.8
- logo_img_h = img_height // 1.8
-
if ratio == 'square':
new_img = Image.new('RGBA', (longest_wh, longest_wh), (255, 255, 255, 255))
@@ -247,6 +237,16 @@ class Controller(http.Controller):
paste_y = (longest_wh - img_height) // 2
new_img.paste(img, (paste_x, paste_y), img)
+
+ if version == '2':
+ logo__footer_path = get_module_resource('indoteknik_api', 'static', 'src', 'images', 'logo-indoteknik-footer.png')
+ logo_footer_img = Image.open(logo__footer_path).convert('RGBA')
+ logo_footer_img.thumbnail((img_width, img_height // 1))
+ logo_footer_w, logo_footer_h = logo_footer_img.size
+ new_img.paste(logo_footer_img, (0, img_height - logo_footer_h), logo_footer_img)
+
+ logo_img_w = img_width // 1.8
+ logo_img_h = img_height // 1.8
logo_img.thumbnail((logo_img_w, logo_img_h))