Replacing SVG with base64 encoded html+img tag for svg, closes #187

This commit is contained in:
Andrew Gibiansky 2014-02-28 19:49:40 -08:00
parent 4b4c233bcb
commit df7625e8ca
3 changed files with 87 additions and 336 deletions

View File

@ -43,4 +43,6 @@ chartData renderable format = do
imgData <- readFile $ fpFromString filename
return $ case format of
PNG -> png width height $ base64 imgData
SVG -> svg $ Char.unpack imgData
SVG -> html $ makeSvgImg $ base64 imgData
where
makeSvgImg base64data = Char.unpack $ "<img src=\"data:image/svg+xml;base64," ++ base64data ++ "\"/>"

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ module IHaskell.Display (
IHaskellDisplay(..),
plain, html, png, jpg, svg, latex,
serializeDisplay,
Width, Height, Base64,
Width, Height, Base64(..),
encode64, base64,
Display(..),
DisplayData(..),