unm-hip-0.0.0.0: A Library for the manipulation of images

Safe HaskellNone

Data.Image.Interactive

Synopsis

Documentation

display :: DisplayFormat df => df -> IO (Handle, Handle, Handle, ProcessHandle)Source

Makes a call to the current display program to be displayed. If the program cannot read from standard in, a file named .tmp-img is created and used as an argument to the program.

>>> frog <- readImage "images/frog.pgm"
>>> display frog

setDisplayProgram :: String -> Bool -> IO ()Source

Sets the program to use when making a call to display and specifies if the program can accept an image via stdin. If it cannot, then a temporary file will be created and passed as an argument instead. By default, ImageMagick (display) is the default program to use and it is read using stdin.

>>> setDisplayProgram "gimp" False
>>> setDisplayProgram "xv" False
>>> setDisplayProgram "display" True

plotHistograms :: (RealFrac (Pixel (Elem a)), MaxMin (Pixel (Elem a)), Listable a, Image (Elem a)) => a -> IO (Handle, Handle, Handle, ProcessHandle)Source

Takes a list, pair, or triple of images and passes them to gnuplot to be displayed as histograms.

>>> frog <- readImage "images/frog.pgm"
>>> plotHistograms $ [frog]

https://raw.github.com/jcollard/unm-hip/master/examples/frog.jpg

https://raw.github.com/jcollard/unm-hip/master/examples/frogplot.jpg

>>> cactii <- readColorImage "images/cactii.ppm"
>>> plotHistograms . colorImageToRGB $ cactii

https://raw.github.com/jcollard/unm-hip/master/examples/cactii.jpg

https://raw.github.com/jcollard/unm-hip/master/examples/cactiiplot.jpg