Manifest icons with purpose any
and maskable
do not adhere to the spec
#778
Labels
bug
Something isn't working
any
and maskable
do not adhere to the spec
#778
When generating images for the web app manifest, PAG currently generates two copies of each size; one with purpose
maskable
and one with purposeany
. PAG generates these two copies as identical, but if you look at the documentation for these purposes, you will find that they should not be identical:any
should have almost no padding, as is expected from traditional icons that are shown as favicons and used in splash screens.maskable
should have a lot of padding, and should adhere to a very strict standard for the size of the padding, as it is specifically designed to let the operating system cut away large portions of the image, to make it fit in custom shapes.The way the images are padded right now, seem to be a sort of in-betweeny, where there is slightly too much padding for an
any
purpose, and slightly too little padding for amaskable
purpose.In order to fix this problem, the padding system has to be much more sophisticated. I believe it will have to auto-detect which parts of the image are padding, and then add/remove padding to fit these purposes.
One way to do that, could be to find the smallest possible centered circle for an image, where every pixel outside the circle is the exact same color (transparent is also a color in this context). Then the image could be cut to exactly fit this circle, generating a base image where the logo is known to be as large as possible. When that base image exists, it should be trivial to create different image types with varying amounts of padding, that hit precise targets of % padding.
Related:
#725
#679
The text was updated successfully, but these errors were encountered: