Skip to content

Commit

Permalink
Minor cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed May 25, 2016
1 parent 158b812 commit 1836e57
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Codec/Picture/Extra.hs
Expand Up @@ -25,10 +25,11 @@ where

import Codec.Picture
import Control.Monad.ST
import Data.Word (Word8)
import qualified Codec.Picture.Types as M

-- | Scale image using bi-linear interpolation.
-- | Scale image using bi-linear interpolation. This is specialized to
-- 'PixelRGB8' only for speed (polymorphic version is easily written, but
-- it's more than twice as slow).

scaleBilinear
:: Int -- ^ Desired width
Expand Down Expand Up @@ -71,7 +72,7 @@ addp :: PixelRGB8 -> PixelRGB8 -> PixelRGB8
addp = mixWith (const f)
where
f x y = fromIntegral $
(0xff :: Word8) `min` (fromIntegral x + fromIntegral y)
(0xff :: Pixel8) `min` (fromIntegral x + fromIntegral y)
{-# INLINE addp #-}

-- | Crop given image. If supplied coordinates are greater than size of
Expand Down

0 comments on commit 1836e57

Please sign in to comment.