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

Automatically generate app icons #8

Open
jbmoelker opened this issue Jul 26, 2016 · 4 comments
Open

Automatically generate app icons #8

jbmoelker opened this issue Jul 26, 2016 · 4 comments

Comments

@jbmoelker
Copy link
Contributor

Currently you need to create app icons for each platform manually using something like iconverticons.com/online/ (as described in README).

It would be great if these app icons would be generated automatically based on the icons defined in the manifest.json. I have good experience on OSX with npm-icon-gen. I could help add this to the tool, if there's interest for it.

@vladikoff
Copy link
Owner

@jbmoelker hey, thanks for making the issue

I tried icon-gen for this and the problem i had was that when you pull images from manifest.json they were not the correct size. We might need to resize the images from the manifest into proper size to match the table given here: https://github.com/akabekobeko/npm-icon-gen#png

@jbmoelker
Copy link
Contributor Author

jbmoelker commented Jul 26, 2016

@vladikoff yes experienced the same issue. I'd say we pick the largest size from the manifest and resize that for all the missing sizes. But honestly I also made a copy of Airhorner_512.png to all the sizes required by npm-icon-gen (16.png, 24.png, ..., 1024.png) and the generated .icns file worked just fine. So maybe wouldn't even need to resize.

@jbmoelker
Copy link
Contributor Author

jbmoelker commented Jul 26, 2016

It appears we need to first look at icon type. If that's not defined we need to fetch the icon and read the headers to determine the type. Which types do we want to support (PNG, SVG, JPG?, WebP?)?

Sizes can be a list of space separated {w}x{h} values. We'll also need to parse all of those to see which are the best icon images to use.

The excerpt below gives an idea of different icon notations:

{
  "icons": [
      {
        "src": "icon/lowres.webp",
        "sizes": "48x48",
        "type": "image/webp"
      },{
        "src": "icon/lowres",
        "sizes": "48x48"
      },{
        "src": "icon/hd_hi.ico",
        "sizes": "72x72 96x96 128x128 256x256"
      },{
        "src": "icon/hd_hi.svg",
        "sizes": "257x257"
      }]
 }

W3C Web App Manifest draft > 8.7 icons member

(btw: just writing this out to get a good understanding of what's required for auto generating platform icons. I find inadequate PRs more wasteful)

@cescoferraro
Copy link

There is nothing like
https://github.com/evilebottnawi/favicons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants