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

Support SVG with only viewbox specified #36

Merged
merged 5 commits into from
Nov 23, 2015
Merged

Support SVG with only viewbox specified #36

merged 5 commits into from
Nov 23, 2015

Conversation

borodean
Copy link
Contributor

When both width and height are not specified, viewbox could be a measure for the dimensions of an image.

@borodean
Copy link
Contributor Author

@netroy Looks like Travis failed due to NPM unavailability.

@ai
Copy link

ai commented Mar 11, 2015

@netroy what do you think about this issue? I need to fix it too. Maybe I can help?

@kyleolsondesign
Copy link

Any updates on this?

@zeke
Copy link
Contributor

zeke commented Nov 22, 2015

@kyleolsondesign @ai I've emailed npm support to try to claim ownership of this package on npm, so we can get fixes like this rolled in. I'll keep you posted.

@borodean
Copy link
Contributor Author

I'll review the code according to my latest findings I've contributed to calipersjs/calipers#30, check the tests and merge it.

borodean added a commit that referenced this pull request Nov 23, 2015
Support SVG with only viewbox specified
@borodean borodean merged commit c7b79c1 into image-size:master Nov 23, 2015
@borodean
Copy link
Contributor Author

Improvements:

  • learns to calculate dimensions if only a viewBox is specified;
  • ignores width and height set in percents;
  • handles single-quoted SVGs.

@zeke, can we release?

@shinnn
Copy link
Contributor

shinnn commented Nov 23, 2015

0d6723b

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

Successfully merging this pull request may close these issues.

None yet

5 participants