webp 0.1.1.0 → 0.1.2.0
raw patch · 4 files changed
+15/−3 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- CHANGELOG.md +4/−0
- src/Codec/Picture/WebP.hs +1/−0
- src/Codec/Picture/WebP/Container.hs +8/−1
- webp.cabal +2/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # webp +## 0.1.2.0++ * Add `isAnimLenient`+ ## 0.1.1.0 * Add `isAnim`
src/Codec/Picture/WebP.hs view
@@ -8,6 +8,7 @@ , encodeRgb8 , encodeRgba8 , isAnim+ , isAnimLenient ) where import Codec.Picture (Image (Image),
src/Codec/Picture/WebP/Container.hs view
@@ -3,11 +3,18 @@ {-# LANGUAGE OverloadedStrings #-} -module Codec.Picture.WebP.Container (isAnim) where+module Codec.Picture.WebP.Container (isAnim, isAnimLenient) where import Control.Monad (unless)+import Data.Bifunctor (bimap) import Data.Binary.Get (Get, getByteString, runGetOrFail, skip) import qualified Data.ByteString.Lazy as BSL++-- | Won't throw exceptions on malformed data+--+-- @since 0.1.2.0+isAnimLenient :: BSL.ByteString -> Either String Bool+isAnimLenient = bimap thd3 thd3.runGetOrFail getAnim where thd3 (_, _, z)=z -- | Sniff out animated WebP --
webp.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: webp-version: 0.1.1.0+version: 0.1.2.0 license: GPL-3 license-file: LICENSE copyright: Copyright: (c) 2020 Vanessa McHale@@ -40,7 +40,7 @@ other-extensions: TypeFamilies TypeOperators ghc-options: -Wall build-depends:- base >=4.7 && <5,+ base >=4.8 && <5, JuicyPixels >=3.0, bytestring, vector >=0.9.1,