| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.ThumbnailPlus
- createThumbnails :: MonadResource m => Configuration -> FilePath -> m CreatedThumbnails
- data Configuration = Configuration {}
- data Size :: * = Size {}
- data ReencodeOriginal
- data FileFormat :: *
- data CreatedThumbnails
- data Thumbnail = Thumbnail {
- thumbFp :: !FilePath
- thumbSize :: !Size
- thumbFormat :: !FileFormat
- thumbReleaseKey :: !(NoShow ReleaseKey)
- newtype NoShow a = NoShow a
Documentation
Arguments
| :: MonadResource m | |
| => Configuration | Configuration values (use |
| -> FilePath | Input image file path. |
| -> m CreatedThumbnails |
Process an image and generate thumbnails for it according to
the given Configuration.
data Configuration Source
Configuration used when
Constructors
| Configuration | |
Fields
| |
Instances
data Size :: *
data ReencodeOriginal Source
Whether the original image should be reencoded or not (cf.,
reencodeOriginal).
Constructors
| Never | Do not reencode the original image. |
| SameFileFormat | Reencode the original using the same file format. |
| NewFileFormat !FileFormat | Reencode the original using the given file format. |
data FileFormat :: *
Instances
data CreatedThumbnails Source
Return value of createThumbnails.
Constructors
| FileSizeTooLarge !Integer | File size exceeded |
| ImageSizeTooLarge !Size | Image size exceeded |
| 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
|
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
| |