SVG v1.1.2 SVG View Source
Main application module.
Link to this section Summary
Functions
Produces a name for given path to svg, by removing the root path from it (second arg), and stripping away leading / and extension
Reads a file, then base64-encodes contents, prepending “data:image…” markup
Reads a file, then URI-encodes contents, prepending “data:image…” markup
Link to this section Functions
Produces a name for given path to svg, by removing the root path from it (second arg), and stripping away leading / and extension.
Example:
iex> name_from_path("/some/path/images/logo.svg", "/some/path/images")
"logo"
iex> name_from_path("/some/path/images/logo.svg", "/some/path")
"images/logo"
Reads a file, then base64-encodes contents, prepending “data:image…” markup.
Reads a file, then URI-encodes contents, prepending “data:image…” markup.