Skip to content

Commit

Permalink
Remove Sixel support to avoid ImageMagick libwand issue (JuliaIO/Imag…
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyun committed Aug 15, 2023
1 parent 2d7eb6d commit a050d7c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
6 changes: 0 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,15 @@ version = "0.3.41-DEV"
[deps]
BlackBoxOptim = "a134a8b2-14d6-55f6-9291-3336d3ab0209"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
Crayons = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
Gadfly = "c91e804a-d5a3-530f-b6f0-dfbca275c004"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
Graphviz_jll = "3c863552-8265-54e4-a6dc-903eb78fde85"
Highlights = "eafb193a-b7ab-5a9e-9068-77385905fa72"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Interact = "c601a237-2ae4-5e1e-952c-7a85b0c7eef1"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
Expand All @@ -38,17 +35,14 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
[compat]
BlackBoxOptim = "0.5, 0.6"
CSV = "0.8, 0.9, 0.10"
Cairo = "1"
Crayons = "4"
DataFrames = "1"
DataStructures = "0.18"
Distributions = "0.23, 0.24, 0.25"
FileIO = "1"
Gadfly = "1"
Graphs = "1"
Graphviz_jll = "2"
Highlights = "0.5"
ImageMagick = "1"
Interact = "0.10"
Interpolations = "0.14"
MacroTools = "0.5"
Expand Down
3 changes: 0 additions & 3 deletions src/util/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,6 @@ plot(df::DataFrame, x, y, z;
plot3!(Val(backend), X, Y, Z; kind, title, legend, legendpos, xlab, ylab, zlab, xlim, ylim, zlim, zgap, zlabgap, aspect)
end

sixel(p::Plot) = sixel(p[])
sixel(::P) where P = error("sixel not supported: $P")

include("plot/UnicodePlots.jl")
include("plot/Gadfly.jl")

Expand Down
18 changes: 0 additions & 18 deletions src/util/plot/Gadfly.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,21 +216,3 @@ _show(io::IO, m::MIME"text/html", p::Gadfly.Plot) = begin
h = Gadfly.Compose.default_graphic_height
Gadfly.SVG(io, w, h, false)(p)
end

import Cairo
import ImageMagick
import FileIO
# https://github.com/tshort/SixelTerm.jl
sixel(p::Gadfly.Plot) = begin
png = IOBuffer()
#HACK: needs to set emit_on_finish false
w = Gadfly.Compose.default_graphic_width
h = Gadfly.Compose.default_graphic_height
p |> Gadfly.PNG(png, w, h, false; dpi=144)
im = ImageMagick.load(png)
six = IOBuffer()
st = FileIO.Stream(FileIO.format"six", six)
ImageMagick.save(st, im)
write(stdout, take!(six))
nothing
end

0 comments on commit a050d7c

Please sign in to comment.