Re: [Bug 26526] Fix aspect ratio constraint

On 9/11/14 1:55 PM, Stefan Håkansson LK wrote:
> On 2014-09-11 19:48, cowwoc wrote:
>> I believe your reasoning is still flawed. You shouldn't evaluate the
>> "goodness" of an epsilon by looking at a handful of resolutions as
>> you've done. You need to evaluate the epsilon against the entire
>> resolution space from 1x1 through 16k.
>>
>> For example, what happens when a user asks for an aspect ratio of 8/12?
>> He might be aiming for 800x1200 but you'll give him 788x1200 for an
>> epsilon of 1/100. That's a huge error margin.

If he's "aiming for 800x1200", shouldn't he express that as { width: 
800, height: 1200 } ?

Since he's not, are you saying that a camera that only has 788x1200 need 
not apply? What precision do we expect for shape alone among multiple 
usually hardware-determined choices, and can a viewer tell?

> I agree, and I think we could go with Cullen's proposal, i.e. the spec
> default (which currently means 1e-10. Everyone has a calculator at hand
> I believe, so getting 10 decimals should not be hard.

I'm OK with that. But just so we understand that precision cuts both 
ways, this means that:

 1. { aspectRatio: { exact: 1.78 } } will always fail (as will all such
    numbers in [1])
 2. { aspectRatio: { exact: 1.778 } } will always fail
 3. { aspectRatio: { exact: 1.7778 } } will always fail
 4. { aspectRatio: { exact: 1.77778 } } will always fail
 5. { aspectRatio: { exact: 1.777778 } } will always fail
 6. { aspectRatio: { exact: 1.7777778 } } will always fail
 7. { aspectRatio: { exact: 1.77777778 } } will always fail
 8. { aspectRatio: { exact: 1.777777778 } } will always fail
 9. { aspectRatio: { exact: 1.7777777778 } } includes all 16:9 displays
10. { aspectRatio: min: 1.778 } excludes all 16:9 displays
11. { aspectRatio: max: 1.778 } includes all 16:9 displays
12. { aspectRatio: max: 1.777 } excludes all 16:9 displays
13. { aspectRatio: max: 1.333 } excludes all 4:3 displays
14. { aspectRatio: min: 1.333 } includes all 4:3 displays


.: Jan-Ivar :.

[1] http://en.wikipedia.org/wiki/4K_resolution#Resolutions

Received on Thursday, 11 September 2014 18:58:06 UTC