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

MSI UI Icon #103

Closed
tmontes opened this issue Jan 3, 2021 · 3 comments
Closed

MSI UI Icon #103

tmontes opened this issue Jan 3, 2021 · 3 comments
Labels
enhancement New feature or request : win
Milestone

Comments

@tmontes
Copy link
Member

tmontes commented Jan 3, 2021

Follow-up from #90.

  • The minimal MSI installation progress UI displays a generic icon.
  • It would be nice for it to include the given application's icon, if any.

(maybe addressing #91, requiring changes to the install progress UI, helps us understand how to attain this) :)

@tmontes tmontes added this to the LATER milestone Jan 3, 2021
@tmontes
Copy link
Member Author

tmontes commented Jan 5, 2021

NOTE:

IDEA:

  • Maybe we could use pillow to auto-generate such bitmaps if/when an icon is given.
  • How hard can that be? :-)

@tmontes
Copy link
Member Author

tmontes commented Jan 6, 2021

PROGRESS:

  • Played around a bit with pillow.
  • This mini program produces a simple banner given an ICO file.
  • Pimping things up a bit could be nice... (how?)
#!/usr/bin/env python3.7

from PIL import Image


BANNER_WIDTH = 493
BANNER_HEIGHT = 312
BANNER_LEFT = 164

BANNER_BACK = 'white'

ICON_WIDTH = 64
ICON_HEIGHT = 64

ICON_X = (BANNER_LEFT - ICON_WIDTH) // 2
ICON_Y = 24


if __name__ == '__main__':

    ico = Image.open('mu.ico')
    ico64 = ico.resize((ICON_WIDTH, ICON_HEIGHT))

    banner = Image.new('RGBA', (BANNER_WIDTH, BANNER_HEIGHT), BANNER_BACK)
    banner.alpha_composite(ico64, (ICON_X, ICON_Y))

    banner.save('banner.png')

NEXT:

  • Let's try and integrate such a banner into the MSI files, shall we?

@tmontes
Copy link
Member Author

tmontes commented Oct 2, 2021

CLOSING:

@tmontes tmontes closed this as completed Oct 2, 2021
@tmontes tmontes added : win enhancement New feature or request labels Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request : win
Projects
None yet
Development

No branches or pull requests

1 participant