Skip to content

Support nativeRaster objects in annotation_raster() and raster2uri() #2174

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

Merged
merged 6 commits into from
Sep 20, 2022

Conversation

zeehio
Copy link
Contributor

@zeehio zeehio commented Aug 24, 2022

nativeRaster objects allow for a much direct and faster rasterizing. If you want to know better about them and their performance I suggest to check the https://github.com/coolbutuseless/nara package (not on CRAN at least for now).

ggplot2 already supports nativeRaster objects through annotation_raster(), however ggplotly fails to render it due to a minor limitation in raster2uri().

This small pull request:

  • Adds support for nativeRaster objects in raster2uri
  • Adds a corresponding unit test
  • Adds the entry to the news

I would really appreciate to see this merged, because right now rasterizing large images is a very slow process.

Thanks!

@zeehio
Copy link
Contributor Author

zeehio commented Sep 20, 2022

Thanks for reviewing the pull request. Looking forward to using this feature! :-)

@cpsievert cpsievert merged commit 32567a0 into plotly:master Sep 20, 2022
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.

2 participants