updated yesod newsfeeed and imagemagick deps
This commit is contained in:
parent
98767bb01c
commit
edf906e418
5 changed files with 13 additions and 14 deletions
|
@ -190,11 +190,10 @@ mediumToEntry ent = do
|
|||
, feedEntryUpdated = mediumTime (entityVal ent)
|
||||
, feedEntryTitle = mediumTitle (entityVal ent)
|
||||
, feedEntryContent = toHtml (fromMaybe (Textarea "") $ mediumDescription $ entityVal ent)
|
||||
, feedEntryEnclosure = Just
|
||||
( StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview $ entityVal ent) []
|
||||
, size
|
||||
, "image/jpeg"
|
||||
)
|
||||
, feedEntryEnclosure = Just $ EntryEnclosure
|
||||
(StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview $ entityVal ent) [])
|
||||
size
|
||||
"image/jpeg"
|
||||
}
|
||||
|
||||
getSize :: FilePath -> IO Int
|
||||
|
|
|
@ -128,8 +128,8 @@ generateThumb path userId albumId = do
|
|||
(iWidth, tWidth, pWidth) <- liftIO $ withMagickWandGenesis $ do
|
||||
(_, w) <- magickWand
|
||||
(_, p) <- magickWand
|
||||
readImage w (decodeString path)
|
||||
readImage p (decodeString path)
|
||||
readImage w (T.pack path)
|
||||
readImage p (T.pack path)
|
||||
w1 <- getImageWidth w
|
||||
h1 <- getImageHeight w
|
||||
let h2 = 230
|
||||
|
@ -144,8 +144,8 @@ generateThumb path userId albumId = do
|
|||
resizeImage p w3 h3 lanczosFilter 1
|
||||
setImageCompressionQuality w 95
|
||||
setImageCompressionQuality p 95
|
||||
writeImage w (Just (decodeString newPath))
|
||||
writeImage p (Just (decodeString prevPath))
|
||||
writeImage w (Just (T.pack newPath))
|
||||
writeImage p (Just (T.pack prevPath))
|
||||
return (w1, w2, w3)
|
||||
return (newPath, prevPath, iWidth, tWidth, pWidth)
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ getThumbWidth path
|
|||
| path == Nothing = pure 230
|
||||
| otherwise = liftIO $ withMagickWandGenesis $ do
|
||||
(_, w) <- magickWand
|
||||
readImage w (decodeString $ fromJust path)
|
||||
readImage w (T.pack $ fromJust path)
|
||||
getImageWidth w
|
||||
|
||||
multiFileField :: (Monad m, RenderMessage (HandlerSite m) FormMessage) => Field m [FileInfo]
|
||||
|
|
|
@ -113,14 +113,14 @@ library
|
|||
, yesod-markdown >= 0.10
|
||||
, blaze-markup >= 0.7
|
||||
, wai >= 3.0
|
||||
, yesod-newsfeed >= 1.5
|
||||
, yesod-newsfeed >= 1.6
|
||||
, unix >= 2.7
|
||||
, bloodhound >= 0.8
|
||||
, http-types
|
||||
-- for Migrations
|
||||
, HDBC
|
||||
, HDBC-postgresql
|
||||
, imagemagick
|
||||
, imagemagick >= 0.0.4
|
||||
, text
|
||||
, filepath
|
||||
, system-filepath
|
||||
|
|
|
@ -107,7 +107,7 @@ extra-deps:
|
|||
- http-date-0.0.6.1
|
||||
- http-types-0.9
|
||||
- http2-1.3.1
|
||||
- imagemagick-0.0.3.5
|
||||
- imagemagick-0.0.4.1
|
||||
- iproute-1.7.0
|
||||
- kan-extensions-4.2.3
|
||||
- keys-3.10.2
|
||||
|
@ -213,7 +213,7 @@ extra-deps:
|
|||
- yesod-core-1.4.18.1
|
||||
- yesod-form-1.4.6
|
||||
- yesod-markdown-0.10.0
|
||||
- yesod-newsfeed-1.5
|
||||
- yesod-newsfeed-1.6
|
||||
- yesod-persistent-1.4.0.3
|
||||
- yesod-static-1.5.0.3
|
||||
- yesod-test-1.5.0.1
|
||||
|
|
Loading…
Reference in a new issue