-
Notifications
You must be signed in to change notification settings - Fork 8
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
Provide access to contact's icon #13
Comments
@rayankans Do you have any insight around how the image files are maintained within an address book system? I always assumed the transformations (clipping to a shape) were applied in real-time and not actually applied to the bitmap itself. I have no basis for that assumption beyond it’s how I would handle it (especially in case the design changed later). |
@aarongustafson I'm not sure if the clipping to a shape is applied in real time or not, but what matters here is how the user agent receives the icon. As a concrete example, the Android contacts provider API, which will likely be the contact source for user agents running on Android phones, returns circular contact icons. |
@rayankans Interesting. We should definitely do a survey of the different providers and potentially reach out to them about how they store (and supply) the photos. To be honest I'm a little shocked that a provider would impose it's design choices—which in this case I'd argue are data-destructive—on data like that. I'll do a bit more digging to see what other systems do after BlinkOn. |
So I took another look at this, and it turns out you can get a square version of an icon from the Android contacts provider API (@aarongustafson FYI). So the whole I think we can do with just returning a A downside would be is that |
Add support for selecting icons, resolves #13
It would be useful to also provide an icon for the contact.
Something like:
The icon field is provided as a
File
object so it can be easily converted to either anImage
orBitmap
, depending on the developer's intent.The type field will contain the MIME type, to not force user agents into using a specific format. It should be exposed to the developers.
IconShape
is an enum describing the shape of the provided icon. It can't cover all of the cases, but at least it can optimize for the most common use-cases, so that developers know how to style the icon with the surroundings it's presented in. The spec can also enforce that the area outside the provided icon should be transparent for the remaining cases.The text was updated successfully, but these errors were encountered: