aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-03-01 09:33:32 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-03-01 09:33:32 -0700
commitdd89dd5ac1fbc25b440b2b88cfc440ac54f6df70 (patch)
tree9d1ed83c11fbb5e5afde3c50fadeae1e615a5c72
parentab1c5b31639a1e878ec20879e9fbace82362fd6e (diff)
downloadsscan-dd89dd5ac1fbc25b440b2b88cfc440ac54f6df70.tar.gz
handle Auto paper size
-rw-r--r--Main.hs24
1 files changed, 13 insertions, 11 deletions
diff --git a/Main.hs b/Main.hs
index ac80935..d4fa299 100644
--- a/Main.hs
+++ b/Main.hs
@@ -139,17 +139,19 @@ scanimageArgs st =
Colour -> "Color"
Greyscale -> "Gray"
Lineart -> "Lineart"
- , "-x"
- , show $ case st^.stPaper of
- A4 -> 210
- Letter -> 215.9
- Photo -> 150
- , "-y"
- , show $ case st^.stPaper of
- A4 -> 297
- Letter -> 279.4
- Photo -> 100
- ]
+ ] ++ case st^.stPaper of
+ Auto -> ["--swcrop=yes"]
+ _ -> [ "-x"
+ , show $ case st^.stPaper of
+ A4 -> 210
+ Letter -> 215.9
+ Photo -> 150
+ , "-y"
+ , show $ case st^.stPaper of
+ A4 -> 297
+ Letter -> 279.4
+ Photo -> 100
+ ]
-- other device-specific scanimage options the old script supported:
-- --swdespeck; --color-filter; --depth