From 0a115a51a316be6c36b8d59e9b9431978385a88a Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Thu, 3 Dec 2015 23:45:05 +0100 Subject: [PATCH] styled code a bit. --- src/Main.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 402abd5..fed4a33 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -14,8 +14,8 @@ import System.IO (stdin) data Options = Options { srcFile :: String - , width :: Int - , height :: Int + , width :: Int + , height :: Int } options :: Parser Options @@ -55,12 +55,12 @@ conv (fp@(PixelRGB8 fr fg fb),PixelRGB8 br bg bb) = printf "\x1b[48;2;%d;%d;%dm\ where lumi :: Word8 -> Char lumi x - | x > 225 = '@' - | x > 180 = 'O' - | x > 150 = 'X' - | x > 50 = 'o' - | x > 25 = 'x' - | x > 10 = '.' + | x > 225 = '@' + | x > 180 = 'O' + | x > 150 = 'X' + | x > 50 = 'o' + | x > 25 = 'x' + | x > 10 = '.' | otherwise = ' ' img2ascii :: ((PixelRGB8,PixelRGB8) -> String) -> (Image PixelRGB8,Image PixelRGB8) -> [[String]]