aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Processors.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/Processors.hs')
-rw-r--r--compiler/src/Processors.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/src/Processors.hs b/compiler/src/Processors.hs
index ded3cc5..df05c24 100644
--- a/compiler/src/Processors.hs
+++ b/compiler/src/Processors.hs
@@ -37,9 +37,6 @@ import Data.Function ((&))
37import Data.Ratio ((%)) 37import Data.Ratio ((%))
38import Data.Char (toLower) 38import Data.Char (toLower)
39 39
40import GHC.Generics (Generic)
41import Data.Aeson (FromJSON)
42
43import System.Directory hiding (copyFile) 40import System.Directory hiding (copyFile)
44import qualified System.Directory 41import qualified System.Directory
45import System.FilePath 42import System.FilePath
@@ -60,7 +57,7 @@ data Format =
60 | Other 57 | Other
61 58
62formatFromPath :: Path -> Format 59formatFromPath :: Path -> Format
63formatFromPath = aux . (map toLower) . fileName 60formatFromPath = aux . (map toLower) . takeExtension . fileName
64 where 61 where
65 aux ".bmp" = Bmp 62 aux ".bmp" = Bmp
66 aux ".jpg" = Jpg 63 aux ".jpg" = Jpg
@@ -71,9 +68,6 @@ formatFromPath = aux . (map toLower) . fileName
71 aux ".gif" = Gif 68 aux ".gif" = Gif
72 aux _ = Other 69 aux _ = Other
73 70
74data Resolution = Resolution
75 { width :: Int
76 , height :: Int } deriving (Show, Generic, FromJSON)
77 71
78type FileProcessor = 72type FileProcessor =
79 FileName -- ^ Input path 73 FileName -- ^ Input path