chalkboard-0.1: Combinators for building and processing 2D images.

Portabilityghc
Stabilityunstable
MaintainerAndy Gill <andygill@ku.edu>

Graphics.Chalkboard.PPM

Description

Reading and writing portable pix maps. For now, we only support color images (P3 and P6 formats).

Synopsis

Documentation

readPPM :: String -> IO (Board (Maybe RGB), (Int, Int))Source

readPPM reads a PPM file, and outputs a Board, and the x and y dimensions of the image.

writePPM :: String -> (Int, Int) -> Board RGB -> IO ()Source

writePPM writes a PPM file, based on a color Board, where bottom left corner of the image is as (0,0).