Re: [w3c/manifest] Add a 'masking' purpose, for allowing the UA to supercompose such icons (#657)

> Android does have an API which takes a single bitmap and converts it into an Android Icon representation:
https://developer.android.com/reference/android/graphics/drawable/Icon.html#createWithAdaptiveBitmap(android.graphics.Bitmap).
> which allows apps (User agents in this case) to not worry about the actual conversion logic.

This doesn't make sense to me. The only description of this method is "Create an Icon pointing to a bitmap in memory that follows the icon design guideline defined by AdaptiveIconDrawable.", but it takes a single Bitmap and AdaptiveIconDrawable guidelines are all about how a foreground layers on a background.

I just don't really see what this method is supposed to do (or how it is relevant here).

> Also browser would not be able to provide a proper conversion as the shadow changes based on the surface the icon is displayed on. And since the platform will get the final masked icon, it can't tell if the user-agent masked it the right way.

Right. The "safe zone" as defined in the spec is insufficient to simply use the supplied image as a background on Android, because Android defines a much larger "dead zone" around the "safe zone". So the user agent needs to extend the image to satisfy the cropping requirements of the host platform.

This isn't (really) anything to do with parallax or dead zone vs safe zone. You can simply think of it as Android's "safe zone" is much smaller than the "safe zone" we defined in this spec (the web spec safe zone is 80% diameter, while Android's safe zone is 61% diameter). That's fine, it just means the image needs to be padded to display correctly on Android. It didn't make sense to have the web spec exactly match Android (the web is bigger than just Android).

This is all explained in my [July 11 post](https://github.com/w3c/manifest/issues/555#issuecomment-404097653) on the bug, with calculations and sample images. (Option B is what we ended up going with.)

> Even when proving just the background, could it comply with the android icon guidelines? That would allow it to enjoy all the android specific features, and appear consistent with other icons.

We don't want to have the web spec demand that developers supply an image compatible with Android icon guidelines. That unnecessarily biases the spec towards Android. We spec the "lowest common denominator" which can be used across many platforms. For example, iOS user agents can adjust the image as required there.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/657#issuecomment-426918525

Received on Thursday, 4 October 2018 07:47:26 UTC