aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
diff options
context:
space:
mode:
authorOzoneGrif2020-02-03 13:39:10 +0100
committerGitHub2020-02-03 13:39:10 +0100
commit8dd664c23ba971362eb0c84438d40a55637dcc67 (patch)
treeda3822620b3b1e21c009c2df6101f8be044119e0 /compiler/src
parentb68f037392f393f1d6781fdbd4f28ee4ddc79807 (diff)
parent5e85fe0743a2ce0d715ce81d37f02729fce01d9c (diff)
downloadldgallery-8dd664c23ba971362eb0c84438d40a55637dcc67.tar.gz
Merge pull request #85 from pacien/fix-imagemagick-multilayer-resolution
compiler: fix resolution extraction for multilayer images
Diffstat (limited to 'compiler/src')
-rw-r--r--compiler/src/Processors.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs
index fc719af..16837a6 100644
--- a/compiler/src/Processors.hs
+++ b/compiler/src/Processors.hs
@@ -126,9 +126,11 @@ resourceAt fsPath resPath = getModificationTime fsPath >>= return . Resource res
126 126
127getImageResolution :: FilePath -> IO Resolution 127getImageResolution :: FilePath -> IO Resolution
128getImageResolution fsPath = 128getImageResolution fsPath =
129 readProcess "identify" ["-format", "%w %h", fsPath] [] 129 readProcess "identify" ["-format", "%w %h", firstFrame] []
130 >>= return . break (== ' ') 130 >>= return . break (== ' ')
131 >>= return . \(w, h) -> Resolution (read w) (read h) 131 >>= return . \(w, h) -> Resolution (read w) (read h)
132 where
133 firstFrame = fsPath ++ "[0]"
132 134
133 135
134type ItemFileProcessor = 136type ItemFileProcessor =