Safe Haskell | Safe-Infered |
---|
Access to individual pixels. It isn't very efficient to handle bitmaps this way.
- 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)
:: 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.
:: 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.
:: PixelComponent t | |
=> Bitmap t | the bitmap |
-> Offset | position (x,y) |
-> [t] |
unsafeReadPixel1 :: PixelComponent t => Bitmap1 t -> Offset -> tSource
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