diff options
author | OzoneGrif | 2020-02-02 04:44:46 +0100 |
---|---|---|
committer | GitHub | 2020-02-02 04:44:46 +0100 |
commit | 56901340cb510ee9012bb4a122b95831258e9789 (patch) | |
tree | 8edfa4089ab2cd3b2375ce8aa8fd758cfc2beb1d /compiler/src | |
parent | dd022bfc7325f2375d84abf14e94ee909eed20b0 (diff) | |
parent | e954915fd5b6c035dbd784f8b8d9c5c0943d76ac (diff) | |
download | ldgallery-56901340cb510ee9012bb4a122b95831258e9789.tar.gz |
Merge pull request #73 from pacien/feature-image-rotation
compiler: auto orient processed images
Diffstat (limited to 'compiler/src')
-rw-r--r-- | compiler/src/Processors.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs index f2ade63..df7e632 100644 --- a/compiler/src/Processors.hs +++ b/compiler/src/Processors.hs | |||
@@ -86,7 +86,11 @@ resizePictureUpTo maxResolution inputPath outputPath = | |||
86 | maxSize Resolution{width, height} = show width ++ "x" ++ show height ++ ">" | 86 | maxSize Resolution{width, height} = show width ++ "x" ++ show height ++ ">" |
87 | 87 | ||
88 | resize :: FileName -> FileName -> IO () | 88 | resize :: FileName -> FileName -> IO () |
89 | resize input output = callProcess "magick" [input, "-resize", maxSize maxResolution, output] | 89 | resize input output = callProcess "magick" |
90 | [ input | ||
91 | , "-auto-orient" | ||
92 | , "-resize", maxSize maxResolution | ||
93 | , output ] | ||
90 | 94 | ||
91 | 95 | ||
92 | type Cache = FileProcessor -> FileProcessor | 96 | type Cache = FileProcessor -> FileProcessor |