diff --git a/JuicyPixels-blurhash.cabal b/JuicyPixels-blurhash.cabal index e0e8395..25d05ae 100644 --- a/JuicyPixels-blurhash.cabal +++ b/JuicyPixels-blurhash.cabal @@ -8,7 +8,7 @@ cabal-version: 1.18 name: JuicyPixels-blurhash version: 0.1.0.3 -synopsis: Blurhash is a very compact represenation of a placeholder for an image +synopsis: Blurhash is a very compact representation of a placeholder for an image description: Please see the README on GitHub at category: Graphics, Image homepage: https://github.com/SamProtas/JuicyPixels-blurhash#readme diff --git a/README.md b/README.md index babeaf2..7fb09c2 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Blurhash is a very compact representation of a placeholder for an image. This library provides a Blurhash encoding and decoding implementation based on the JuicyPixels representation of images. -For the full Blurhash sales pitch and algorithm explaination see either of: +For the full Blurhash sales pitch and algorithm explanation see either of: - The website: diff --git a/package.yaml b/package.yaml index 8536f5e..8a5faa2 100644 --- a/package.yaml +++ b/package.yaml @@ -17,7 +17,7 @@ extra-doc-files: # Metadata used when publishing your package -synopsis: Blurhash is a very compact represenation of a placeholder for an image +synopsis: Blurhash is a very compact representation of a placeholder for an image category: Graphics, Image # To avoid duplicated efforts in documentation and dealing with the diff --git a/src/Codec/Picture/Blurhash.hs b/src/Codec/Picture/Blurhash.hs index 1176401..eeb2c44 100644 --- a/src/Codec/Picture/Blurhash.hs +++ b/src/Codec/Picture/Blurhash.hs @@ -11,7 +11,7 @@ -- -- This library provides a Blurhash encoding and decoding implementation based on the JuicyPixels representation of images. -- --- For the full Blurhash sales pitch and algorithm explaination see either of: +-- For the full Blurhash sales pitch and algorithm explanation see either of: -- -- - The website: -- diff --git a/src/Codec/Picture/Blurhash/Internal/DList.hs b/src/Codec/Picture/Blurhash/Internal/DList.hs index acd67f5..66f5adc 100644 --- a/src/Codec/Picture/Blurhash/Internal/DList.hs +++ b/src/Codec/Picture/Blurhash/Internal/DList.hs @@ -11,7 +11,7 @@ -- __Note__: This is an internal module not subject to PVP adherence. module Codec.Picture.Blurhash.Internal.DList where --- | A type alias for a Difference list for effecient appents +-- | A type alias for a Difference list for efficient appents type DList a = [a] -> [a] -- | Convert a list to a difference list diff --git a/src/Codec/Picture/Blurhash/Internal/Decode.hs b/src/Codec/Picture/Blurhash/Internal/Decode.hs index f37031d..27070ce 100644 --- a/src/Codec/Picture/Blurhash/Internal/Decode.hs +++ b/src/Codec/Picture/Blurhash/Internal/Decode.hs @@ -161,7 +161,7 @@ decodePixel colors height width sizeY sizeX x y = foldl' acc (PixelRGBF 0 0 0) let i' = realToFrac i j' = realToFrac j basis = cos (pi * x' * i' / width') * cos (pi * y' * j' / height') - -- Vector index safe in practice, convered by garbage data and property tests + -- Vector index safe in practice, covered by garbage data and property tests PixelRGBF r' g' b' = colors V.! (i + j * sizeX) in PixelRGBF (r + r' * basis) (g + g' * basis) (b + b' * basis) diff --git a/src/Codec/Picture/Blurhash/Internal/Encode.hs b/src/Codec/Picture/Blurhash/Internal/Encode.hs index 4ac2fdb..4681a3f 100644 --- a/src/Codec/Picture/Blurhash/Internal/Encode.hs +++ b/src/Codec/Picture/Blurhash/Internal/Encode.hs @@ -59,7 +59,7 @@ data EncodeError encodeConfigDefault :: EncodeConfig encodeConfigDefault = EncodeConfig 4 4 --- | A helper funciton to validate the provided encoding component count. +-- | A helper function to validate the provided encoding component count. checkComponent :: Int -> Either EncodeError Int checkComponent c | c < 1 || c > 9 = Left InvalidComponents @@ -67,13 +67,13 @@ checkComponent c -- | Encode a 'DynamicImage' to a blurhash. Calls 'encodeDynamicWithConfig' with 'encodeConfigDefault'. -- --- Note: Relies on 'convertRGB8' before proceding with the standard Blurhash algorithm. +-- Note: Relies on 'convertRGB8' before proceeding with the standard Blurhash algorithm. encodeDynamic :: DynamicImage -> Either EncodeError BS.ByteString encodeDynamic = encodeDynamicWithConfig encodeConfigDefault -- | Encode a 'DynamicImage' to a blurhash with a given an 'EncodeConfig'. -- --- Note: Relies on 'convertRGB8' before proceding with the standard Blurhash algorithm. +-- Note: Relies on 'convertRGB8' before proceeding with the standard Blurhash algorithm. encodeDynamicWithConfig :: EncodeConfig -> DynamicImage -> Either EncodeError BS.ByteString encodeDynamicWithConfig config = encodeRGB8WithConfig config . convertRGB8