yarr-image-io-1.3.0: Image IO for Yarr library

Safe HaskellNone

Data.Yarr.IO.Image

Contents

Synopsis

The Image array type

Image IO

readImage :: FilePath -> IO ImageSource

Reads Image from file.

writeImage :: FilePath -> Image -> IO ()Source

Writes Image to file.

readRGBSource

Arguments

:: Fun N3 Word8 a

Passed red, green, blue component in 0-255 range

-> Image

Image to import

-> UArray D L Dim2 a 

Fuction to uniformly import images of any type.

Example:

 anyImage <- readImage "lena.png"
 let image = readRGB (\r g b -> ...) anyImage

readRGBVectors :: (Vector v Word8, Dim v ~ N3) => Image -> UArray D L Dim2 (v Word8)Source

readRGBVectors = readRGB construct