\HeaderA{display}{Interactive image display}{display}
\aliasA{animate}{display}{animate}
\begin{Description}\relax
Display images.
\end{Description}
\begin{Usage}
\begin{verbatim}
display(x, no.GTK, main, colorize,
        title = paste(deparse(substitute(x))),
        useGTK = TRUE)
animate(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An \code{Image} object or an array.
\item[\code{useGTK}] A logical of length 1. See details.
\item[\code{title}] Window title.
\item[\code{no.GTK, main, colorize}] Deprecated.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
By default (and if available), the \code{display} function uses GTK to
open a window and display the image. Multiple windows can be opened in
this way.

If GTK is not available or if \code{useGTK} is \code{FALSE},
ImageMagick is used; only one window at a time can be open,
and it needs to be closed by the user interactively before
the next window can be opened. The ImageMagick display is not
available on MS-Windows.

The \code{animate} function shows an animated sequence of images and uses \code{ImageMagick}. Similar limitations as for \code{display} apply
(only one window, not on MS-Windows.)
\end{Details}
\begin{Value}
The functions are called for their side effect.
Return value is invisible \code{NULL}.
\end{Value}
\begin{Author}\relax
Oleg Sklyar, \email{osklyar@ebi.ac.uk}
\end{Author}
\begin{References}\relax
ImageMagick: \url{http://www.imagemagick.org}
GTK: \url{http://www.gtk.org}, on MS-Windows \url{http://gladewin32.sf.net}
\end{References}
\begin{Examples}
\begin{ExampleCode}
   ## single image
   lena = readImage(system.file("images", "lena-color.png", package="EBImage"))
   if (interactive()) display(lena)

   ## animated threshold
   x = readImage(system.file("images", "lena-color.png", package="EBImage"))
   x = resize(x, 128, 128)
   xt = list()
   for (t in seq(0.1, 5, len=9)) xt=c(xt, list(blur(x, s=t)))
   xt = combine(xt)
   if (interactive()) display(xt, title='Blurred Lenas')
\end{ExampleCode}
\end{Examples}

