Safe Haskell | None |
---|---|
Language | Haskell98 |
Data.Bitmap.Pure.Pixels
Description
Access to individual pixels. It isn't very efficient to handle bitmaps this way.
Synopsis
- data Bitmap1 t
- data Bitmap2 t
- data Bitmap3 t
- data Bitmap4 t
- bitmap1 :: Bitmap t -> Bitmap1 t
- bitmap2 :: Bitmap t -> Bitmap2 t
- bitmap3 :: Bitmap t -> Bitmap3 t
- bitmap4 :: Bitmap t -> Bitmap4 t
- unsafeReadComponent :: PixelComponent t => Bitmap t -> Offset -> Int -> t
- unsafeReadComponents :: PixelComponent t => Bitmap t -> Offset -> Int -> Int -> [t]
- unsafeReadPixel :: PixelComponent t => Bitmap t -> Offset -> [t]
- unsafeReadPixel1 :: PixelComponent t => Bitmap1 t -> Offset -> t
- unsafeReadPixel2 :: PixelComponent t => Bitmap2 t -> Offset -> (t, t)
- unsafeReadPixel3 :: PixelComponent t => Bitmap3 t -> Offset -> (t, t, t)
- unsafeReadPixel4 :: PixelComponent t => Bitmap4 t -> Offset -> (t, t, t, t)
Documentation
Newtypes for bitmaps with a fixed number of channels (components per pixel)
Instances
BitmapClass Bitmap1 Source # | |
Defined in Data.Bitmap.Pure.Pixels Methods underlyingBitmap :: Bitmap1 t -> Bitmap t |
Instances
BitmapClass Bitmap2 Source # | |
Defined in Data.Bitmap.Pure.Pixels Methods underlyingBitmap :: Bitmap2 t -> Bitmap t |
Instances
BitmapClass Bitmap3 Source # | |
Defined in Data.Bitmap.Pure.Pixels Methods underlyingBitmap :: Bitmap3 t -> Bitmap t |
Instances
BitmapClass Bitmap4 Source # | |
Defined in Data.Bitmap.Pure.Pixels Methods underlyingBitmap :: Bitmap4 t -> Bitmap t |
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.
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.
Arguments
:: PixelComponent t | |
=> Bitmap t | the bitmap |
-> Offset | position (x,y) |
-> [t] |
unsafeReadPixel1 :: PixelComponent t => Bitmap1 t -> Offset -> t Source #
unsafeReadPixel2 :: PixelComponent t => Bitmap2 t -> Offset -> (t, t) Source #
unsafeReadPixel3 :: PixelComponent t => Bitmap3 t -> Offset -> (t, t, t) Source #
unsafeReadPixel4 :: PixelComponent t => Bitmap4 t -> Offset -> (t, t, t, t) Source #