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

Some Logos Fail to Render #53

Open
jrg94 opened this issue Apr 30, 2020 · 2 comments
Open

Some Logos Fail to Render #53

jrg94 opened this issue Apr 30, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jrg94
Copy link
Member

jrg94 commented Apr 30, 2020

I attempted to add an old log of my to the image, and I ran into an error:

Logo Overlay Error

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Jeremy Grifski\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1883, in __call__
    return self.func(*args)
  File "E:/Projects/trc-image-titler/image_titler/gui.py", line 83, in update_view
    self._render_preview(title=title, tier=tier, logo_path=logo_path)
  File "E:/Projects/trc-image-titler/image_titler/gui.py", line 96, in _render_preview
    self.menu.current_edit = process_image(self.menu.image_path, title, tier=tier, logo_path=logo_path)
  File "E:\Projects\trc-image-titler\image_titler\utilities.py", line 258, in process_image
    _draw_logo(cropped_img, logo)
  File "E:\Projects\trc-image-titler\image_titler\utilities.py", line 127, in _draw_logo
    img.paste(logo, (LOGO_PADDING, height - LOGO_SIZE[1] - LOGO_PADDING), logo)
  File "E:\Projects\trc-image-titler\venv\lib\site-packages\PIL\Image.py", line 1494, in paste
    self.im.paste(im, box, mask.im)
ValueError: bad transparency mask

I haven't had time to investigate this, so I figured I'd drop the issue here for now. I'm wondering if it's because this logo is a jpg. Maybe we should restrict logos to pngs.

@jrg94 jrg94 added the bug Something isn't working label Apr 30, 2020
@jrg94 jrg94 self-assigned this Apr 30, 2020
@jrg94
Copy link
Member Author

jrg94 commented Apr 30, 2020

Nevermind, I got this same issue for a different logo:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\Jeremy Grifski\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1883, in __call__
    return self.func(*args)
  File "E:/Projects/trc-image-titler/image_titler/gui.py", line 83, in update_view
    self._render_preview(title=title, tier=tier, logo_path=logo_path)
  File "E:/Projects/trc-image-titler/image_titler/gui.py", line 96, in _render_preview
    self.menu.current_edit = process_image(self.menu.image_path, title, tier=tier, logo_path=logo_path)
  File "E:\Projects\trc-image-titler\image_titler\utilities.py", line 258, in process_image
    _draw_logo(cropped_img, logo)
  File "E:\Projects\trc-image-titler\image_titler\utilities.py", line 127, in _draw_logo
    img.paste(logo, (LOGO_PADDING, height - LOGO_SIZE[1] - LOGO_PADDING), logo)
  File "E:\Projects\trc-image-titler\venv\lib\site-packages\PIL\Image.py", line 1494, in paste
    self.im.paste(im, box, mask.im)
ValueError: bad transparency mask

@jrg94
Copy link
Member Author

jrg94 commented Apr 30, 2020

Here are the culprits:

icon-360x360

icon-cut-down-square

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant