rasterise_logos

Documentation for eth_defi.vault_report.charts.rasterise_logos function.

rasterise_logos(logo_uris, size=96, columns=16)

Convert logo data URIs to Pillow images for the Pillow-drawn hero image.

PNG logos are decoded directly. SVG logos, such as the website’s chain logos, are rendered by Kaleido in one pass: Pillow cannot draw SVG.

Parameters
  • logo_uris (set[str]) – PNG or SVG data URIs.

  • size (int) – Rendered size of an SVG logo in pixels.

  • columns (int) – SVG logos per row of the render sheet, which keeps the sheet within browser canvas limits.

Returns

Data URI -> RGBA image.

Return type

dict[str, PIL.Image.Image]