bitmap-0.0.2: A library for handling and manipulating bitmaps (rectangular pixel arrays).

Safe HaskellSafe-Infered

Data.Bitmap.Pure.Pixels

Description

Access to individual pixels. It isn't very efficient to handle bitmaps this way.

Synopsis

Documentation

data Bitmap1 t Source

Newtypes for bitmaps with a fixed number of channels (components per pixel)

Instances

unsafeReadComponentSource

Arguments

:: PixelComponent t 
=> Bitmap t

the bitmap

-> Offset

position (x,y)

-> Int

channel index {0,1,...,nchannels-1}

-> t 

It is not very efficient to read/write lots of pixels this way.

unsafeReadComponentsSource

Arguments

:: PixelComponent t 
=> Bitmap t

the bitmap

-> Offset

position (x,y)

-> Int

channel index {0,1,...,nchannels-1}

-> Int

the number of components to read

-> [t] 

Please note that the component array to read shouldn't cross the boundary between lines.

unsafeReadPixelSource

Arguments

:: PixelComponent t 
=> Bitmap t

the bitmap

-> Offset

position (x,y)

-> [t]