Copyright | (c) 2020 Sam Protas |
---|---|
License | BSD3 |
Maintainer | Sam Protas <sam.protas@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Internal Blurhash helper functions shared by encoding and decoding.
Note: This is an internal module not subject to PVP adherence.
Synopsis
- signPow :: Float -> Float -> Float
- clamp :: Ord a => a -> a -> a -> a
- sRGBImageToLinear :: Image PixelRGB8 -> Image PixelRGBF
- pixelToLinear :: PixelRGB8 -> PixelRGBF
- linearImageToSRGB :: Image PixelRGBF -> Image PixelRGB8
- linearPixelToSRGB :: PixelRGBF -> PixelRGB8
- linearToSRGB :: (RealFrac a, Integral b, Floating a) => a -> b
Documentation
signPow :: Float -> Float -> Float Source #
Helper function specified by other Blurhash implementations
clamp :: Ord a => a -> a -> a -> a Source #
Clamps it's 3rd argument between the min and max specified by the 1st and 2nd arguments respectively
sRGBImageToLinear :: Image PixelRGB8 -> Image PixelRGBF Source #
Convert an RGB8 Image to an RGBF Image using the color conversion specified by Blurhash
pixelToLinear :: PixelRGB8 -> PixelRGBF Source #
Convert an RGB8 Pixel to an RGBF Pixel using the color conversion specified by Blurhash
linearImageToSRGB :: Image PixelRGBF -> Image PixelRGB8 Source #
Convert an RGBF Image to an RGB8 Image using the color conversion specified by Blurhash
linearPixelToSRGB :: PixelRGBF -> PixelRGB8 Source #
Convert an RGBF Pixel to an RGB8 Pixel using the color conversion specified by Blurhash