imagesize-conduit-0.4.0: Determine the size of some common image formats.

Safe HaskellSafe-Infered

Data.Conduit.ImageSize

Synopsis

Documentation

sinkImageSize :: Monad m => Sink ByteString m (Maybe Size)Source

Specialized version of sinkImageInfo that returns only the image size.

data Size Source

Constructors

Size 

Fields

width :: Int
 
height :: Int
 

Instances

sinkImageInfo :: Monad m => Sink ByteString m (Maybe (Size, FileFormat))Source

Find out the size of an image. Also returns the file format that parsed correctly. Note that this function does not verify that the file is indeed in the format that it returns, since it looks only at a small part of the header.