Why not just have {"src": "...", "scalable": true} and let the UA figure it 
out. If it's a bitmap, try and scale it anyway (it'll be blurry, but that's the 
dev's fault). If the UA doesn't get scalable for any of the icons, it shouldn't 
scale them (unless none of them are the size it needs, in which case it should 
pick the closest size up and scale down or the nearest size down and scale up).

----- Original Message -----
From: "Marcos Caceres" <mcace...@mozilla.com>
To: "Mounir Lamouri" <mou...@lamouri.fr>
Cc: "dev-webapps" <dev-webapps@lists.mozilla.org>, "Vivien Nicolas" 
<vnico...@mozilla.com>, "Jonas Sicking" <jo...@sicking.cc>, "Tim Guan-tin 
Chien" <timdr...@mozilla.com>
Sent: Wednesday, June 19, 2013 6:02:03 AM
Subject: Re: Icon sizes and display densities




On Wednesday, 19 June 2013 at 10:58, Mounir Lamouri wrote:

> On 18/06/13 17:40, Marcos Caceres wrote:
> > I'm not sure I follow? If you have:
> >  
> > {src: "foo", width: "64", height: "64", type: "image/svg"}
> >  
> > The UA assumes that the generated content is going to be "image/svg"?… more 
> > below.  
>  
> Yes. But what if the icon might be a bitmap format or a vectorial format
> depending on some parameters?

If the parameters are expressed explicit through the URL, then one declares two 
or more icons:
  
{src: "foo?format=svg", width: "64", height: "64", type: "image/svg"}
{src: "foo?format=jpeg", width: "64", height: "64", type: "image/jpeg"}

{src: "foo?format=webp", width: "64", height: "64", type: "image/webp"}


In the case where the type is server determined (e.g., content negotiation or 
UA string), the developer is basically agreeing to deal with it, So the 
following is still ok:   

{src: "foo?format=random", width: "64", height: "64"}  

The content negotiation case can be problematic (for devs) as UAs basically say 
"I'll accept anything you got!" (image/* and */*) in the Accept header for 
image requests. See:

https://developer.mozilla.org/en-US/docs/HTTP/Content_negotiation#Values_for_an_image





_______________________________________________
dev-webapps mailing list
dev-webapps@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-webapps
_______________________________________________
dev-webapps mailing list
dev-webapps@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to