Skip to main content

Module rasterize

Module rasterize 

Source
Expand description

SVG / PNG helpers for Adaptive Cards fallbacks. SVG builders + optional PNG rasterize for Adaptive Cards Image data URIs.

Used for chart / canvas / gauge / shape / zstack / gradient backgrounds that Adaptive Cards cannot express natively.

Functions§

element_to_png_data_uri
Convenience: element → PNG data URI.
element_to_svg
Build an SVG document for chart/canvas/gauge/shape; None for other element types.
gradient_to_png_data_uri
Rasterize a gradient background to a PNG data URI when rasterize is enabled.
gradient_to_svg
Build an SVG gradient fill for Adaptive Cards backgroundImage baking.
svg_to_data_uri
Rasterize SVG to data:image/png;base64,… when the rasterize feature is on.