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

PNG Support #39

Open
Stoeoef opened this issue Apr 14, 2019 · 3 comments
Open

PNG Support #39

Stoeoef opened this issue Apr 14, 2019 · 3 comments

Comments

@Stoeoef
Copy link

Stoeoef commented Apr 14, 2019

Reading the 1.0 roadmap .png support seems to be planned. Is there anything ongoing for implementing this?

Otherwise, the easiest way seems to rely on an existing svg renderer like librsvg or resvg. Exporting an svg would consists of creating the svg root node, finding good export options and handing those over to the renderer.

The major downside of this approach, despite the increased compile times, is in my opinion the dependency on a system library like cairo or qt. resvg allows to choose from these, librsvg is based on cairo. Thus, it may be appropriate to hide these backends behind feature flags.

As a plus, many more image formats should be exportable. For resvg, I was able to export .bmp, .jpg, .png and probably more.

I could offer a hand for implementing this, just let me know about your preferences.

@Ploppz
Copy link
Contributor

Ploppz commented Apr 21, 2019

resvg looks good. If there is no better solution (e.g. a pure rust library) I would say go for it, although I don't have the final say about what gets merged. @mindriot101 @milliams what do you think?

@milliams
Copy link
Owner

I think that using something like resvg makes sense. I'd like to keep plotlib and its dependencies as pure-rust as possible in general but that shouldn't get too much in the way of adding features.

@sstadick
Copy link

Is this on the roadmap for a future release / are you interested in PR's for adding resvg?

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

4 participants