thumbnail-plus-1.0.5: Generate thumbnails easily and safely.

Safe HaskellNone
LanguageHaskell2010

Graphics.ThumbnailPlus

Synopsis

Documentation

createThumbnails #

Arguments

:: MonadResource m 
=> Configuration

Configuration values (use def for default values).

-> FilePath

Input image file path.

-> m CreatedThumbnails 

Process an image and generate thumbnails for it according to the given Configuration.

data Configuration #

Configuration used when

Constructors

Configuration 

Fields

Instances

data Size :: * #

Constructors

Size 

Fields

Instances

Eq Size 

Methods

(==) :: Size -> Size -> Bool #

(/=) :: Size -> Size -> Bool #

Ord Size 

Methods

compare :: Size -> Size -> Ordering #

(<) :: Size -> Size -> Bool #

(<=) :: Size -> Size -> Bool #

(>) :: Size -> Size -> Bool #

(>=) :: Size -> Size -> Bool #

max :: Size -> Size -> Size #

min :: Size -> Size -> Size #

Read Size 
Show Size 

Methods

showsPrec :: Int -> Size -> ShowS #

show :: Size -> String #

showList :: [Size] -> ShowS #

data CreatedThumbnails #

Return value of createThumbnails.

Constructors

FileSizeTooLarge !Integer

File size exceeded maxFileSize.

ImageSizeTooLarge !Size

Image size exceeded maxImageSize.

ImageFormatUnrecognized

Could not parse size information for the image. Remember that we understand JPGs, PNGs and GIFs only.

CreatedThumbnails ![Thumbnail] !(NoShow ReleaseKey)

Thumbnails were created successfully. If reencodeOriginal was not Never, then the first item of the list is going to be the reencoded image.

data Thumbnail #

Information about a generated thumbnail. Note that if ask for the original image to be reencoded, then the first Thumbnail will actually have the size of the original image.

Constructors

Thumbnail 

Fields

newtype NoShow a #

Hack to allow me to derive Show for data types with fields that don't have Show instances.

Constructors

NoShow a 

Instances

Eq (NoShow a) # 

Methods

(==) :: NoShow a -> NoShow a -> Bool #

(/=) :: NoShow a -> NoShow a -> Bool #

Typeable * a => Show (NoShow a) # 

Methods

showsPrec :: Int -> NoShow a -> ShowS #

show :: NoShow a -> String #

showList :: [NoShow a] -> ShowS #