I have been thinking about how to implement server side rendering / export of image formats other than SVG.
I came up with a number of different approaches:
Implement custom renderers for each format directly in httpgd.
Pro: Fast and optimized output.
Cons: A lot of work. Increased complexity and package size.
Modularize rendering. (C++ rendering API for httpgd "plugins")
Pro: Fast and optimized output. Small package size. Third party plugins.
Cons: Increased complexity of the dependency graph. Difficult to keep API stable and safe.
Include conversion library (i.e. imagemagick) as a optional dependency to convert from SVG.
Pro: Very large number of formats supported without additional implementation cost.
Cons: Slower and unoptimized output.
I think 3. is the most realistic approach. This would also allow for renderers of specific formats to be implemented directly at a later date and use the library as a fallback if no custom renderer is available.
A library candidate would be https://github.com/ropensci/magick . Which unfortunately does not seem to implement C++ bindings yet, if we decide on going that way we should ask there or if necessary implement a custom API with Magick++.
This issue is meant as an open discussion, I am open to all opinions and ideas.
I have been thinking about how to implement server side rendering / export of image formats other than SVG. I came up with a number of different approaches:
I think 3. is the most realistic approach. This would also allow for renderers of specific formats to be implemented directly at a later date and use the library as a fallback if no custom renderer is available. A library candidate would be https://github.com/ropensci/magick . Which unfortunately does not seem to implement C++ bindings yet, if we decide on going that way we should ask there or if necessary implement a custom API with Magick++.
This issue is meant as an open discussion, I am open to all opinions and ideas.