Re: [Bug 26526] Fix aspect ratio constraint

On 11/09/2014 3:02 PM, cowwoc wrote:
> On 11/09/2014 2:57 PM, Jan-Ivar Bruaroey wrote:
>> 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
>>
>
> Good point. Remind me again why users shouldn't be allowed to specify 
> the epsilon?
>
> One user might want *exactly* one aspect ratio and another might want 
> something *roughly* around another ratio. Isn't this a business decision?

Sorry, I forgot to reply to the first half of your message:

> 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?

Here is my use-case: I've got this 4x3 section in my UI for video. Now, 
I want the highest resolution video you can give me with this aspect 
ratio. If you return some low-res video I will up-scale it to fit. 
Meaning, 800x1200 or 400x600 are fine but 788x1200 is not because it 
will look bad to have a column of 12 black pixels alongside the video 
(I'm aiming for no black bars or cropping). If I really have to (the 
webcam doesn't support the desired resolution) I'll crop the video, but 
I don't like you making me crop the video when I don't have to (rounding 
error caused by the epsilon value).

I hope this clears it up.

Gili

Received on Thursday, 11 September 2014 19:24:31 UTC