JuicyPixels-blurhash-0.1.0.0: Blurhash is a very compact represenation of a placeholder for an image

Copyright(c) 2020 Sam Protas
LicenseBSD3
MaintainerSam Protas <sam.protas@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Blurhash.Internal.Common

Description

Internal Blurhash helper functions shared by encoding and decoding.

Note: This is an internal module not subject to PVP adherence.

Synopsis

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

linearToSRGB :: (RealFrac a, Integral b, Floating a) => a -> b Source #

Convert an RGBF color to an RGB8 color using the color conversion specified by Blurhash