Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Safe Haskell | None |
Manipulating bitmaps
- data Bitmap = BitmapData (Array F DIM3 Word8) (Maybe Int)
- _BitmapArray :: Functor f => (Array F DIM3 Word8 -> f (Array F DIM3 Word8)) -> Bitmap -> f Bitmap
- _BitmapHash :: Functor f => (Maybe Int -> f (Maybe Int)) -> Bitmap -> f Bitmap
- bitmapSize :: Bitmap -> (Int, Int)
- readBitmap :: MonadIO m => FilePath -> m Bitmap
- writeBitmap :: MonadIO m => FilePath -> Bitmap -> m ()
- loadBitmapFromFile :: MonadIO m => FilePath -> m Bitmap
- toBitmap :: Array F DIM3 Word8 -> Bitmap
- toStableBitmap :: Array F DIM3 Word8 -> Bitmap
- makeStableBitmap :: Array F DIM3 Word8 -> IO Bitmap
- onBitmapWithHashable :: Hashable h => h -> (Array F DIM3 Word8 -> Array F DIM3 Word8) -> Bitmap -> Bitmap
- cropBitmap :: Bitmap -> (Int, Int) -> (Int, Int) -> Bitmap
Basic types and functions
Bitmap data with unique hashes.
_BitmapArray :: Functor f => (Array F DIM3 Word8 -> f (Array F DIM3 Word8)) -> Bitmap -> f BitmapSource
_BitmapHash :: Functor f => (Maybe Int -> f (Maybe Int)) -> Bitmap -> f BitmapSource
_BitmapHash
:: Lens'Bitmap
(Maybe
Int
)
Load and Save
readBitmap :: MonadIO m => FilePath -> m BitmapSource
Load an image file.
loadBitmapFromFile :: MonadIO m => FilePath -> m BitmapSource
Deprecated: use readBitmap instead
Constructing bitmaps
toStableBitmap :: Array F DIM3 Word8 -> BitmapSource
Create stable Bitmap
from the given array and compute the hash.
makeStableBitmap :: Array F DIM3 Word8 -> IO BitmapSource
Create stable Bitmap
with unique hash from the given array.