Skip to content
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

Why do we allow 0x descriptors? #143

Closed
yoavweiss opened this issue Apr 9, 2014 · 3 comments
Closed

Why do we allow 0x descriptors? #143

yoavweiss opened this issue Apr 9, 2014 · 3 comments

Comments

@yoavweiss
Copy link
Member

It seems that the x descriptors are defined as non-negative integers. Shouldn't they be positive integers?

@yoavweiss
Copy link
Member Author

I got it very wrong - x descriptors are floats!!!
Still, can we define them as positive floats?

@eeeps
Copy link

eeeps commented Apr 9, 2014

I'd be in favor of requiring x descriptors to be positive floats, and w descriptors to be positive integers. I don't see how either could be reasonably set to zero.

@zcorpan
Copy link

zcorpan commented Apr 10, 2014

Per irc discussions, 0x is basically like <img width=9999999999999999999999999999999999> which is allowed. We should allow it and require an infinitely big image to be rendered, and implementations would have a limit (allowed by http://whatwg.org/C#hardwareLimitations ) on how big images can be. Normatively we don't need to add anything, but we could add a note somewhere saying something -- any suggestions?

For 0w, we could drop it during parsing, but I don't see any benefit in doing so and there's a risk of introducing bugs with changing the algorithm. However we can basically disallow it by requiring that it match the image's actual width.

yoavweiss added a commit that referenced this issue Apr 10, 2014
Require that 'w' matches the image width. Fixes #143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants