JuicyPixels-blp-0.2.0.0: BLP format decoder/encoder over JuicyPixels library
Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Blp.Internal.Encoder

Synopsis

Documentation

encodeBlp :: Int -> BlpStruct -> ByteString Source #

Convert spare BLP structure into compact stream of bytes

blpEncoder :: Int -> BlpStruct -> Put Source #

Raw encoder for BLP

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