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 scale factor in more NativeImage APIs #8849

Merged
merged 12 commits into from Mar 7, 2017

Conversation

kevinsawicki
Copy link
Contributor

@kevinsawicki kevinsawicki commented Mar 7, 2017

This pull request adds support for a scaleFactor option, defaulting to 1.0, to the following NativeImage APIs:

  • toDataURL
  • toBitmap
  • getBitmap
  • toPNG

This can be used when multiple representations of an image exist and you want access to a specific representation for a scale factor.

This also updates toDataURL and toPNG to work when there is no 1x scale factor representation. This can occur for images returned via other APIs such as app.getFileIcon.

Closes #8767

@kevinsawicki kevinsawicki changed the title Support scale factor to more NativeImage APIs Support scale factor in more NativeImage APIs Mar 7, 2017
@kevinsawicki kevinsawicki merged commit 4f81787 into master Mar 7, 2017
@kevinsawicki kevinsawicki deleted the to-data-url-scale-factor branch March 7, 2017 20:55
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

2 participants