From 80c83b921b440ea345783b8a9f26dc0acb87abd4 Mon Sep 17 00:00:00 2001 From: pacien Date: Tue, 25 Oct 2022 17:16:52 +0200 Subject: compiler: fix exif-rotated image dimension retrieval GitHub: fixes #336 --- compiler/src/FileProcessors.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/src/FileProcessors.hs b/compiler/src/FileProcessors.hs index 6e1738e..db5c9a1 100644 --- a/compiler/src/FileProcessors.hs +++ b/compiler/src/FileProcessors.hs @@ -100,7 +100,8 @@ type FileDescriber a = getImageResolution :: FilePath -> IO Resolution getImageResolution fsPath = - readProcess "magick" ["identify", "-format", "%w %h", firstFrame] [] + readProcess "magick" + ["identify", "-auto-orient", "-format", "%w %h", firstFrame] [] >>= parseResolution . break (== ' ') where firstFrame :: FilePath -- cgit v1.2.3