packages feed

thumbnail 0.7 → 0.7.1

raw patch · 2 files changed

+9/−1 lines, 2 files

Files

Graphics/Thumbnail.hs view
@@ -14,6 +14,12 @@  data ImageFormat = Gif | Jpeg | Png +-- | Convert `ImageFormat` to a mime type+formatToType :: ImageFormat -> String+formatToType Gif  = "image/gif"+formatToType Jpeg = "image/jpeg"+formatToType Png  = "image/png"+ data Thumbnail = Thumbnail { fmt :: ImageFormat     -- ^ Image Format Type                            , img :: Image           -- ^ Thumbnail Image                            , sz  :: Size            -- ^ Thumbnail Size@@ -23,9 +29,11 @@                            , saveFile :: FilePath -> IO ()                            } +-- | Create a thumbnails with the default size mkThumbnail :: L.ByteString -> IO (Either String Thumbnail) mkThumbnail = mkThumbnail' defaultBounds +-- | Create a thumbnail from a specific subregion of the image mkThumbnail' :: ((Int,Int),(Int,Int)) -> L.ByteString -> IO (Either String Thumbnail) mkThumbnail' sizeBounds = thumbnail . L.unpack   where
thumbnail.cabal view
@@ -1,5 +1,5 @@ Name:                thumbnail-Version:             0.7+Version:             0.7.1 Synopsis:            generate thumbnail image Description:         generate thumbnail image Homepage:            https://github.com/cutsea110/thumbnail