Closed jwortmann closed 2 weeks ago
This would allow to display images for arbitrary user types, as long as they provide an implementation for Base.show for the MIME type image/png as described at https://docs.julialang.org/en/v1/manual/types/#man-custom-pretty-printing.
Base.show
image/png
Example:
julia> using PNGFiles, TesetImages, ImageInTerminal julia> struct Foo end julia> Base.show(io::IO, ::MIME"image/png", ::Foo) = PNGFiles.save(io, testimage("mandrill")) julia> foo = Foo() julia> display("image/png", foo)
This would allow to display images for arbitrary user types, as long as they provide an implementation for
Base.show
for the MIME typeimage/png
as described at https://docs.julialang.org/en/v1/manual/types/#man-custom-pretty-printing.Example: