ยค Bitmap, Bit, et al

Bitmaps

Types

data Bitmap bits = Bitmap Size (Maybe Point) bits
instance Eq bits => Eq (Bitmap bits)
instance Functor Bitmap
instance Ord bits => Ord (Bitmap bits)
instance Read bits => Read (Bitmap bits)
instance Show bits => Show (Bitmap bits)
instance Graphic (Bitmap PixmapId)
instance Graphic (Bitmap [Int])

type Bit = Bool

bm :: Int -> Int -> bits -> Bitmap bits
bits2bitmap :: Point -> [Bit] -> Bitmap [Int]
doubleBM :: Bitmap [Int] -> Bitmap [Int]
explodeBM :: Bitmap [Int] -> Bitmap [[Bit]]
implodeBM :: Bitmap [[Bit]] -> Bitmap [Int]

Description

Values of type Bitmap are used to represent bitmaps (images with one bit per pixel). The type allows the bits in a bitmap to be represented in a few different ways:

Functions explodeBM, implodeBM and bitmapFromData convert between these representations.

Functions bm and bits2bitmap are convenience functions for creating bitmaps without a hotspot.

The function doubleBM doubles the size (width and height) of a bitmap.

See Also

bitmapFromData, BitmapFile.