Safe Haskell | None |
---|
- 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
:: 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
Configuration | |
|
data ReencodeOriginal Source
Whether the original image should be reencoded or not (cf.,
reencodeOriginal
).
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 Source
data CreatedThumbnails Source
Return value of createThumbnails
.
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.
Thumbnail | |
|