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

Codec.Picture.Blp

Synopsis

Documentation

readBlp :: FilePath -> IO (Either String DynamicImage) Source #

Read BLP from given file without mipmaps

readBlpMipmaps :: FilePath -> IO (Either String [DynamicImage]) Source #

Read BLP from given file with mipmaps

decodeBlp :: ByteString -> Either String DynamicImage Source #

Decodes BLP without mipmaps

decodeBlpMipmaps :: ByteString -> Either String [DynamicImage] Source #

Decodes BLP and returns original image plus all mipmaps

mipMapsUpTo Source #

Arguments

:: Int

Minimum size of picture side for generation of mipmap (ex. 2, 4, 16, 32, 64, 512, 1024 and etc)

-> DynamicImage

Image for which we generate mipmaps

-> Int 

Calculate needed count of mipmaps to cover sizes up to given minimum size (helper for 'writeBlp*' functions)