Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- encodeBlp :: Int -> BlpStruct -> ByteString
- blpEncoder :: Int -> BlpStruct -> Put
- createMipMaps :: Image PixelRGBA8 -> [Image PixelRGBA8]
- createMipMapsIndexed :: Pixel a => Image a -> [Image a]
- scanHeader :: Int -> [ByteString] -> ByteString
- toBlpStruct :: BlpCompression -> Int -> Int -> DynamicImage -> BlpStruct
- toBlpExt :: BlpCompression -> BlpPictureType -> Int -> Int -> Image PixelRGBA8 -> BlpExt
Documentation
encodeBlp :: Int -> BlpStruct -> ByteString Source #
Convert spare BLP structure into compact stream of bytes
createMipMaps :: Image PixelRGBA8 -> [Image PixelRGBA8] Source #
Scale image to form the sequence of mipmaps. The first element is always the original picture.
The scale procedure assumes that original image has power of 2 sides, that allows to simply pick average of 4 pixels.
createMipMapsIndexed :: Pixel a => Image a -> [Image a] Source #
Scale image to form the sequence of mipmaps. The first element is always the original picture.
The scale procedure assumes that original image has power of 2 sides, that allows to simply pick 1 of 4 pixels.
scanHeader :: Int -> [ByteString] -> ByteString Source #
Manually scan shared prefix of each mipmap
toBlpStruct :: BlpCompression -> Int -> Int -> DynamicImage -> BlpStruct Source #
Convert to BLP structure some image with given BLP options and quality (for JPEG compression)
toBlpExt :: BlpCompression -> BlpPictureType -> Int -> Int -> Image PixelRGBA8 -> BlpExt Source #
Convert picture to BLP payload
Orphan instances
Storable PixelRGBA8 Source # | |
sizeOf :: PixelRGBA8 -> Int # alignment :: PixelRGBA8 -> Int # peekElemOff :: Ptr PixelRGBA8 -> Int -> IO PixelRGBA8 # pokeElemOff :: Ptr PixelRGBA8 -> Int -> PixelRGBA8 -> IO () # peekByteOff :: Ptr b -> Int -> IO PixelRGBA8 # pokeByteOff :: Ptr b -> Int -> PixelRGBA8 -> IO () # peek :: Ptr PixelRGBA8 -> IO PixelRGBA8 # poke :: Ptr PixelRGBA8 -> PixelRGBA8 -> IO () # |