imagesize-conduit 0.3.0 → 0.4.0
raw patch · 2 files changed
+5/−5 lines, 2 filesdep ~conduitPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: conduit
API changes (from Hackage documentation)
Files
- Data/Conduit/ImageSize.hs +3/−3
- imagesize-conduit.cabal +2/−2
Data/Conduit/ImageSize.hs view
@@ -31,7 +31,7 @@ -- since it looks only at a small part of the header. sinkImageInfo :: Monad m => C.Sink S.ByteString m (Maybe (Size, FileFormat)) sinkImageInfo =- C.Processing (pushHeader id) close+ C.NeedInput (pushHeader id) close where close = return Nothing pushHeader front bs'@@ -42,7 +42,7 @@ sinkPush gif $ S.drop 6 bs | S.length bs >= 8 && S.take 8 bs == S.pack [137, 80, 78, 71, 13, 10, 26, 10] = sinkPush png $ S.drop 8 bs- | S.length bs < 11 = C.Processing (pushHeader $ S.append bs) close+ | S.length bs < 11 = C.NeedInput (pushHeader $ S.append bs) close | otherwise = C.Done (Just bs) Nothing where bs = front bs'@@ -65,7 +65,7 @@ return $ (\w h -> (Size w h, PNG)) <$> mw <*> mh else return Nothing - sinkPush (C.Processing push _) x = push x+ sinkPush (C.NeedInput push _) x = push x sinkPush _ _ = error "Data.Conduit.ImageSize.sinkPush" jpg = do
imagesize-conduit.cabal view
@@ -1,5 +1,5 @@ Name: imagesize-conduit-Version: 0.3.0+Version: 0.4.0 Synopsis: Determine the size of some common image formats. Description: Currently supports PNG, GIF, and JPEG. This package provides a Sink that will consume the minimum number of bytes necessary to determine the image dimensions. License: BSD3@@ -18,7 +18,7 @@ Library Exposed-modules: Data.Conduit.ImageSize Build-depends: base >= 4 && < 5- , conduit >= 0.3 && < 0.4+ , conduit >= 0.4 && < 0.5 , bytestring >= 0.9 ghc-options: -Wall