This small package implements image show methods suitable for
graphical platforms such as IJulia,
VS Code and Juno.
It is intended to provide convenient
inline presentation of greyscale or color images.
Things that users of ImageShow need to know:
- Without
ImageShow, 2d imageAbstractMatrix{<:Colorant}will be encoded and displayed as a SVG image, which is not performant for generic image. - Once you load this package, 2d image will be encoded and displayed as a PNG image. To encode the
data as PNG image, either
ImageIOorImageMagickshould be installed. using Imagesautomatically loadsImageShowfor you.
This package provides three non-exported functions play/explore and gif to interpret your 3D
image or 2d images as either a video sequence or a gif.
- (Experimental)
play/exploreare interactive tools; it show images frame by frame as video sequence. gifis non-interactive; it encodes the image as gif.simshowis a simple image viewer to display arrays/images within Pluto or Jupyter. Works with complex numbers too. See?simshowfor more.
Feel free to replace gif with play/explore and see how it works:
using ImageShow, TestImages, ImageTransformations
# 3d image
img3d = testimage("mri-stack") |> collect
ImageShow.gif(img3d)
# 2d images
toucan = testimage("toucan") # 150×162 RGBA image
moon = testimage("moon") # 256×256 Gray image
framestack = [toucan, moon];
ImageShow.gif(framestack)
# a do-function version
img = testimage("cameraman")
ImageShow.gif(-π/4:π/64:π/4; fps=10) do θ
imrotate(img, θ, axes(img))
endSee also mosaic, provided by MosaicViews/ImageCore, for a 2d alternative of gif.
The functionality of ImageShow has historically been included in the Images umbrella package.