Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Plotly.toImage: add format to remove all semi-transparent elements #4433

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

Closed
antoinerg opened this issue Dec 18, 2019 · 1 comment
Closed
Labels
feature something new

Comments

@antoinerg
Copy link
Contributor

In order to add EMF support in Orca (plotly/orca#152), we had to remove all semi-transparency because EMF does not support it. At the time, we did this work in Orca itself. However, as @etpinard pointed out in plotly/orca#152 (comment)

We could even move this compatibility logic to plotly.js' Snapshot.toSVG - which already does a few similar things. I'm not sure if we should be adding a Plotly.toImage flag (e.g. noOpacity) or add a "format" (e.g. svg-for-emf)?

Thinking about this again, I think adding a noOpacity flag in plotly.js makes sense. There are probably other image formats out there that don't fully support an alpha channel. Now this doesn't solve all the EMF/Inkscape issues; perhaps these remaining issues could be handling in Orca? What do you think @antoinerg ?

@etpinard was clairvoyant in this regard: EPS also does not support semi-transparency. When it's present, it leads to ugly rasterization (see plotly/orca#248 for details).

Therefore I think it would make sense to add a new format to Plotly.toImage to remove all semi-transparent elements. Its name could be svg-opaque.

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

2 participants