-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: add TerminalGraphicDisplay for image/png #49
Conversation
src/ImageInTerminal.jl
Outdated
@@ -93,6 +97,8 @@ function __init__() | |||
@warn "ImageInTerminal is not supported for Windows platform: Julia at least v1.6.0 is required." | |||
disable_encoding() | |||
end | |||
|
|||
pushdisplay(TerminalGraphicDisplay(stdout)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be ideal because if there're other GUI image viewers, we'd better use them. Currently, it seems that vscode is smart enough to figure the order out, I'll need to check other GUIs to see if it's also the same case.
julia> typeof.(Base.Multimedia.displays)
4-element Vector{DataType}:
TextDisplay
REPL.REPLDisplay{REPL.LineEditREPL}
ImageInTerminal.TerminalGraphicDisplay{Base.TTY, Base.TTY}
VSCodeServer.InlineDisplay
Create self contained examples for copy/paste: without sixel using ImageInTerminal, Latexify
main() = latexify(:(x/y)) |> s -> render(s, MIME("image/png"))
main() with sixel 1 using Sixel, ImageInTerminal, Latexify
main() = @latexify([2+3i ∞; π x/(1/x + (y+x)^2)]) |> s -> render(s, MIME("image/png"))
main() Footnotes
|
@johnnychen94, what's left to do for this PR to get merged ? |
For the bigger picture of this package, I've commented in JuliaPlots/UnicodePlots.jl#196 (comment). For this PR I think it's mainly a functionality check and unit tests; I wasn't sure how this PR would affect the normal usage of vscode+julia, Atom+julia, and Jupyter+julia. |
It'd be great if we could merge this one, and add an option to remove the |
@t-bltg I think I might never have the time to really dive into this package in the near future, so feel free to do anything you like to ImageInTerminal and related. |
Thanks @johnnychen94, I might no be the best qualified to enhance
Are you ok with these (and pushing in your branch ?) After merging this one, I'll rework and merge #58. |
Yes of course. You have made great progress to UnicodePlots -- a fantastical work. I believe if you put some effort into ImageInTerminal, this package will revive as well. |
Thanks ! I'll try my best ... |
closes #48
without sixel: