-
Notifications
You must be signed in to change notification settings - Fork 377
Data URL & Embedded Resources support (including base64)
Daniel Luberda edited this page Mar 22, 2018
·
5 revisions
Following uri formats are supported
data:image/png;base64,[BASE64ENCODEDFILE]
data:image/svg+xml;base64,[BASE64ENCODEDSVGFILE]
<SVG>NOT_ENCODED_SVGFILECONTENT</SVG>
data:image/svg+xml,<SVG>[NOT_ENCODED_SVGFILECONTENT</SVG>
resource://{resourceName}
resource://{resourceName}?assembly={Uri.EscapeUriString(resourceAssembly.FullName)}";
https://stackoverflow.com/questions/658446/how-do-i-find-the-fully-qualified-name-of-an-assembly
You can also use built-in ImageSource implementations:
new EmbeddedResourceImageSource(resourceName)
new EmbeddedResourceImageSource(resourceName, assembly)
new DataUrlImageSource(string dataUrl)