aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2017-02-25 17:04:02 -0700
committerSean Whitton <spwhitton@spwhitton.name>2017-02-25 17:04:02 -0700
commit8404de738146228cb1540e4dff87b3b713af4230 (patch)
tree03c5de58f0c5fcbc690a15da6d571d29ba019464
parentccf3105ab3dc4b5ffb5a2fb510c2c503876b96f5 (diff)
downloadsscan-8404de738146228cb1540e4dff87b3b713af4230.tar.gz
import remaining presets from python sscan
-rw-r--r--Presets.hs51
1 files changed, 49 insertions, 2 deletions
diff --git a/Presets.hs b/Presets.hs
index c462d7b..2539653 100644
--- a/Presets.hs
+++ b/Presets.hs
@@ -9,8 +9,13 @@ import Types.Preset
import Types.State
presets :: [Preset]
-presets = [ Preset 'h' "handwritten notes" handwrittenNotes
- , Preset 't' "typewritten docs" typewrittenDocs
+presets = [ Preset 'H' "handwritten notes" handwrittenNotes
+ , Preset 'T' "typewritten docs" typewrittenDocs
+ , Preset 'C' "standard DPI colour PDF, full page" colourPDF
+ , Preset 'I' "standard DPI colour PNG, full page" colourPNG
+ , Preset 'A' "standard DPI colour PNG, autocropped" colourCroppedPNG
+ , Preset 'B' "black and white PDF, full page" bnwPDF
+ , Preset 'P' "high DPI 6x4 photo" photo
]
lookupPreset :: Char -> Maybe Preset
@@ -21,6 +26,7 @@ handwrittenNotes = \st -> st
, _stColour = Greyscale
, _stDPI = 75
, _stPaper = st^.stDefaultPaper
+ , _stOutFormat = PDF
}
typewrittenDocs = \st -> st
@@ -28,4 +34,45 @@ typewrittenDocs = \st -> st
, _stColour = Greyscale
, _stDPI = 300
, _stPaper = st^.stDefaultPaper
+ , _stOutFormat = PDF
+ }
+
+colourPDF = \st -> st
+ { _stOCR = False
+ , _stColour = Colour
+ , _stDPI = 300
+ , _stPaper = st^.stDefaultPaper
+ , _stOutFormat = PDF
+ }
+
+colourPNG = \st -> st
+ { _stOCR = False
+ , _stColour = Colour
+ , _stDPI = 300
+ , _stPaper = st^.stDefaultPaper
+ , _stOutFormat = PNG
+ }
+
+colourCroppedPNG = \st -> st
+ { _stOCR = False
+ , _stColour = Colour
+ , _stDPI = 300
+ , _stPaper = Auto
+ , _stOutFormat = PNG
+ }
+
+bnwPDF = \st -> st
+ { _stOCR = False
+ , _stColour = Lineart
+ , _stDPI = 150
+ , _stPaper = st^.stDefaultPaper
+ , _stOutFormat = PDF
+ }
+
+photo = \st -> st
+ { _stOCR = False
+ , _stColour = Colour
+ , _stDPI = 600
+ , _stPaper = Photo
+ , _stOutFormat = PNG
}