aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorpacien2020-02-02 22:31:15 +0100
committerpacien2020-02-02 22:31:15 +0100
commit5e85fe0743a2ce0d715ce81d37f02729fce01d9c (patch)
treeda3822620b3b1e21c009c2df6101f8be044119e0 /compiler
parentb68f037392f393f1d6781fdbd4f28ee4ddc79807 (diff)
downloadldgallery-5e85fe0743a2ce0d715ce81d37f02729fce01d9c.tar.gz
compiler: fix resolution extraction for multilayer images
GitHub: closes #84
Diffstat (limited to 'compiler')
-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 =