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

Safe HaskellNone
LanguageHaskell98

Data.Yarr.IO.Image

Contents

Synopsis

The Image array type

Image IO

readImage :: FilePath -> IO Image Source

Reads Image from file.

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

Writes Image to file.

readRGB Source

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