- data BitmapString = BitmapString {
- _bmps_data :: GenString
- _bmps_dimensions :: Dimensions (BIndexType BitmapString)
- _bmps_rowAlignment :: Int
- _bmps_redHead :: Bool
- _bmps_alphaHead :: Maybe Bool
- _bmps_paddingHead :: Int
- _bmps_paddingTail :: Int
- _bmps_rowFromTop :: Bool
- _bmps_columnFromLeft :: Bool
- _bmps_rowFromBeg :: Int
- _bmps_rowFromEnd :: Int
- _bmps_columnFromBeg :: Int
- _bmps_columnFromEnd :: Int
- bmps_data :: :-> BitmapString GenString
- bmps_dimensions :: :-> BitmapString (Dimensions (BIndexType BitmapString))
- bmps_rowAlignment :: :-> BitmapString Int
- bmps_redHead :: :-> BitmapString Bool
- bmps_alphaHead :: :-> BitmapString (Maybe Bool)
- bmps_paddingHead :: :-> BitmapString Int
- bmps_paddingTail :: :-> BitmapString Int
- bmps_rowFromTop :: :-> BitmapString Bool
- bmps_columnFromLeft :: :-> BitmapString Bool
- bmps_rowFromBeg :: :-> BitmapString Int
- bmps_rowFromEnd :: :-> BitmapString Int
- bmps_columnFromBeg :: :-> BitmapString Int
- bmps_columnFromEnd :: :-> BitmapString Int
- formatEq :: BitmapString -> BitmapString -> Bool
- defaultBSFormat :: BitmapString
- rowPadding :: BIndexType BitmapString -> Int -> Int -> (Int, Int)
- bytesPerPixel :: BitmapString -> Int
- rowPaddingBS :: BitmapString -> (Int, Int)
- rgbOffsets :: BitmapString -> (Int, Int, Int)
- alphaOffset :: BitmapString -> Maybe Int
- pixelPart :: BitmapString -> BPixelType BitmapString -> Int -> StringCellChar GenStringDefault
- imageSizeBS :: BitmapString -> Int
- constructBitmapStringFormatted :: BitmapString -> Dimensions (BIndexType BitmapString) -> (Coordinates (BIndexType BitmapString) -> BPixelType BitmapString) -> BitmapString
- bitmapFmtBGR24A4VR :: BitmapString
- bitmapFmtRGB24A4VR :: BitmapString
- bitmapFmtRGB24A4 :: BitmapString
- bitmapFmtRGB32 :: BitmapString
- encodeBSFormat :: StringCells s => BitmapString -> BitmapString -> s
- encodeIBF_BGR24A4VR' :: StringCells s => BitmapString -> s
- encodeIBF_RGB24A4VR' :: StringCells s => BitmapString -> s
- encodeIBF_RGB24A4' :: StringCells s => BitmapString -> s
- encodeIBF_RGB32' :: StringCells s => BitmapString -> s
- tryBSFormat :: StringCells s => String -> BitmapString -> BitmapString -> s -> Either String BitmapString
- tryIBF_BGR24A4VR' :: StringCells s => BitmapString -> s -> Either String BitmapString
- tryIBF_RGB24A4VR' :: StringCells s => BitmapString -> s -> Either String BitmapString
- tryIBF_RGB24A4' :: StringCells s => BitmapString -> s -> Either String BitmapString
- tryIBF_RGB32' :: StringCells s => BitmapString -> s -> Either String BitmapString
Documentation
data BitmapString Source
A bitmap represented as a string or stored as bytes
By default, the RGB32 format (where the most significant byte, the head-most one, is unused) is used.
The bitmap must be stored by pixels not separated by component. Each pixel must contain at least the red, blue, and green component, each one byte wide (bytes are assumed to be octets), either in that order or reversed. There may be an alpha component either immediately before the other three components or immediately after. Thus there are four possible arrangements of components for each pixel, which must be consistent for every pixel. Any amount of padding or unused bytes is permitted before each pixel, but the amount must be fixed. The same is true also after each pixel.
This type is most efficient with lazy bytestrings.
BitmapString | |
|
formatEq :: BitmapString -> BitmapString -> BoolSource
defaultBSFormat :: BitmapStringSource
Default BitmapString
format
This is equivalent to IBF_BGRU32
rowPadding :: BIndexType BitmapString -> Int -> Int -> (Int, Int)Source
Return (rowSize, paddingSize) based on width, bytes per pixel, and alignment
Be careful when using the results of this function that you're actually using the right value.
rowPaddingBS :: BitmapString -> (Int, Int)Source
Return (rowSize, paddingSize)
Be careful when using the results of this function that you're actually using the right value.
rgbOffsets :: BitmapString -> (Int, Int, Int)Source
pixelPart :: BitmapString -> BPixelType BitmapString -> Int -> StringCellChar GenStringDefaultSource
Get part of a pixel as a cell of GenStringDefault
The bitmap passed is only used for its format; its dimensions and data are not used. This function doesn't return any alpha parts; for those it returns pad bytes, which are zero.
imageSizeBS :: BitmapString -> IntSource
constructBitmapStringFormatted :: BitmapString -> Dimensions (BIndexType BitmapString) -> (Coordinates (BIndexType BitmapString) -> BPixelType BitmapString) -> BitmapStringSource
Construct a bitmap in the format of the meta bitmap passed
Only the format fields of the bitmap is used, so the data and dimensions of it can be undefined
.
The data in the new bitmap is what GenStringDefault
is aliased to.
encodeBSFormat :: StringCells s => BitmapString -> BitmapString -> sSource
Used by the encoders
encodeIBF_BGR24A4VR' :: StringCells s => BitmapString -> sSource
encodeIBF_RGB24A4VR' :: StringCells s => BitmapString -> sSource
encodeIBF_RGB24A4' :: StringCells s => BitmapString -> sSource
encodeIBF_RGB32' :: StringCells s => BitmapString -> sSource
tryBSFormat :: StringCells s => String -> BitmapString -> BitmapString -> s -> Either String BitmapStringSource
Used by the decoders
tryIBF_BGR24A4VR' :: StringCells s => BitmapString -> s -> Either String BitmapStringSource
tryIBF_RGB24A4VR' :: StringCells s => BitmapString -> s -> Either String BitmapStringSource
tryIBF_RGB24A4' :: StringCells s => BitmapString -> s -> Either String BitmapStringSource
tryIBF_RGB32' :: StringCells s => BitmapString -> s -> Either String BitmapStringSource