<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Base64 Path versus Base64 SVG]]></title><description><![CDATA[<p dir="auto">Just dropping this here because I <strong>know</strong> I'll be looking for this info at some point in the future <img src="https://forum.hise.audio/assets/plugins/nodebb-plugin-emoji/emoji/android/1f602.png?v=fba14f4754a" class="not-responsive emoji emoji-android emoji--joy" style="height:23px;width:auto;vertical-align:middle" title=":joy:" alt="😂" /></p>
<p dir="auto"><strong>HISE &gt; Tools &gt; Show SVG to Path Converter</strong></p>
<p dir="auto"><strong>Base64 Path</strong></p>
<ul>
<li><strong>What it is:</strong> Just the geometry - the raw path outline. HISE parses the SVG's path data, serializes it as JUCE binary path data (Path::writePathToStream), and Base64-encodes that. No compression.</li>
<li><strong>What it drops:</strong> All styling. Colours, fills, strokes, gradients, multiple shapes - gone. You get single monochrome outline.</li>
<li><strong>Best for:</strong> UI icons and shapes you want to recolour yourself, LAF buttons, anytime you control the fill. Smaller and simpler.</li>
<li><strong>How you use it:</strong></li>
</ul>
<pre><code>const var iconData = "....";        // pasted output
var p = Content.createPath();
p.loadFromData(iconData);
// in a paint routine:
g.fillPath(p, area);                // you pick the colour
</code></pre>
<p dir="auto"><strong>Base64 SVG</strong></p>
<ul>
<li><strong>What it is:</strong> The entire SVG document (the XML text) ZSTD-compressed, then Base64-encoded.</li>
<li><strong>What it drops:</strong> Nothing. It preserves everything - multiple paths, fill/stroke colours, gradients, groups, transforms.</li>
<li><strong>Best for</strong>: Multi-colour logos, splash graphics, pre-designed artwork you want rendered exactly as drawn.</li>
<li><strong>How you use it:</strong></li>
</ul>
<pre><code>const var svgData = "....";         // pasted output
var svg = Content.createSVG(svgData);
// in a paint routine:
g.drawSVG(svg, area, 1.0);          // renders with its own colours/styling
</code></pre>
<p dir="auto"><strong>Which to choose</strong></p>
<pre><code>  ┌───────────────────────────┬───────────────────────────────────┬────────────────────────────────────┐
  │                           │            Base64 Path            │             Base64 SVG             │
  ├───────────────────────────┼───────────────────────────────────┼────────────────────────────────────┤
  │ Preserves colours/styling │ No                                │ Yes                                │
  ├───────────────────────────┼───────────────────────────────────┼────────────────────────────────────┤
  │ Multiple shapes/groups    │ Flattened to one outline          │ Kept intact                        │
  ├───────────────────────────┼───────────────────────────────────┼────────────────────────────────────┤
  │ You recolour it in script │ Yes (you must)                    │ No (uses embedded colours)         │
  ├───────────────────────────┼───────────────────────────────────┼────────────────────────────────────┤
  │ Size                      │ Smaller, uncompressed             │ Larger source, but ZSTD-compressed │
  ├───────────────────────────┼───────────────────────────────────┼────────────────────────────────────┤
  │ Loads via                 │ Content.createPath + loadFromData │ Content.createSVG + g.drawSVG      │
  └───────────────────────────┴───────────────────────────────────┴────────────────────────────────────┘
</code></pre>
<p dir="auto"><strong>Rule of thumb</strong>: if it's a single-colour icon you want to tint from the script (e.g. active/inactive states), use Base64 Path. If it's a designed, multi-colour graphic that should look exactly like the artwork, use Base64 SVG.</p>
]]></description><link>https://forum.hise.audio/topic/14894/base64-path-versus-base64-svg</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 13:39:06 GMT</lastBuildDate><atom:link href="https://forum.hise.audio/topic/14894.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Jul 2026 09:27:17 GMT</pubDate><ttl>60</ttl></channel></rss>