Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
69db704d
Commit
69db704d
authored
Jul 06, 2015
by
Christoph Ruegge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read binary files as ByteString
parent
807f8c97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
Charts.hs
ihaskell-display/ihaskell-charts/IHaskell/Display/Charts.hs
+1
-1
Juicypixels.hs
...play/ihaskell-juicypixels/IHaskell/Display/Juicypixels.hs
+2
-2
Plot.hs
ihaskell-display/ihaskell-plot/IHaskell/Display/Plot.hs
+1
-1
No files found.
ihaskell-display/ihaskell-charts/IHaskell/Display/Charts.hs
View file @
69db704d
...
...
@@ -37,7 +37,7 @@ chartData renderable format = do
mkFile
opts
filename
renderable
-- Convert to base64.
imgData
<-
fmap
Char
.
pack
$
readFile
filename
imgData
<-
Char
.
readFile
filename
return
$
case
format
of
PNG
->
png
width
height
$
base64
imgData
...
...
ihaskell-display/ihaskell-juicypixels/IHaskell/Display/Juicypixels.hs
View file @
69db704d
...
...
@@ -60,8 +60,8 @@ displayImageAsJpg renderable = do
-- Write the image
saveJpgImage
95
filename
renderable
-- Convert to base64.
imgData
<-
readFile
filename
return
$
Display
[
jpg
(
imWidth
renderable
)
(
imHeight
renderable
)
$
base64
(
CBS
.
pack
imgData
)
]
imgData
<-
CBS
.
readFile
filename
return
$
Display
[
jpg
(
imWidth
renderable
)
(
imHeight
renderable
)
$
base64
imgData
]
-- The type DynamicImage does not have a function to extract width and height
imWidth
::
DynamicImage
->
Int
...
...
ihaskell-display/ihaskell-plot/IHaskell/Display/Plot.hs
View file @
69db704d
...
...
@@ -28,7 +28,7 @@ figureData figure format = do
writeFigure
format
fname
(
w
,
h
)
figure
-- Read back, and convert to base64.
imgData
<-
Char
.
pack
<$>
readFile
fname
imgData
<-
Char
.
readFile
fname
let
value
=
case
format
of
PNG
->
png
w
h
$
base64
imgData
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment