Re: CfC: to publish "The srcset attribute" specification as a First Public Working Draft (FPWD)

On Monday, Feb 4, 2013, at 11:11 PM, Fred Andrews wrote:

> > From: mat@matmarquis.com
> > Date: Mon, 4 Feb 2013 22:00:00 -0500
> 
> > The relationship between the sizes is communicated by the same criteria used to determine which should be served. It’s not necessary for the UA to know the exact dimensions of the image—if the author has flagged an image source as only being appropriate for high-resolution screens, it is the larger image. Given `sd.jpg 1x, hd.jpg 2x,` it’s clear to the UA which of these will be the larger image. If the concern is that the author will specify these incorrectly, there isn’t much we can do syntactically to avoid that.
> 
> Lets boil it down to a simple example that you can not refute.
> 
> Let there be two images:  image_200x100.jpg and image_400x200.jpg with resolutions 200x100 and 400x200 pixels respectively.
> 
> Let the author hint to the UA to use image_200x100.jpg on low density 1x devices and image_400x200.jpg on high density 2x devices.
> 
> Let the author hint that the UA should upscale the images to fit a larger image box.

> <img style="width: 800px; height: 400px: "srcset="image_200x100.jpg 1x, image_400x200.jpg 2x">

Upscaling either source, in this case, would result in a distorted image. For any user with a standard resolution display, the image will be scaled up four times by the CSS and heavily distorted. For any user with a high resolution but qualified context, the image will be scaled up twice by the CSS and less distorted. For a user with a high-resolution display but unqualified context—low bandwidth, for example—the image will be scaled up four times by the CSS and heavily distorted. This isn’t something authors would reasonably do, but in this scenario the existing syntax does what you describe below.

> Let the UA make a choice and let the choice be to select the smallest image that yields sharp image presentation - a reasonable use case.

In the example you provide, *this is precisely what happens*. The only reason this wouldn’t be the case is if the larger image were specified as `1x` and the smaller as `2x`—which would be a very obvious authoring error.

> The UA does not know the image sizes, it does not know that image_200x100.jpg is 200x100 pixels, or that image_400x200.jpg is 400x200 pixels so it can not solve this technical problem.  The UA does not know if the author hinted to upscale or downscale the images.

> If you can refute this then please prove it or otherwise please withdraw your proposals.

I appreciate your feedback and welcome you to file bugs against either/both extension specifications, and regret that we couldn’t come to an understanding on this.

> cheer
> Fred

Received on Tuesday, 5 February 2013 04:34:13 UTC