From a4380981f2297137779b9e0a78a8db1eaa8592db Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Wed, 16 Dec 2015 00:35:12 +0100 Subject: [PATCH] changed meaning of 256-color flag to match the description --- src/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index b68635e..68fec21 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -37,7 +37,7 @@ main :: IO () main = execParser opthelp >>= run run :: Options -> IO () -run (Options src w h c) = do +run (Options src w h redcol) = do src' <- if src == "-" then B.getContents else B.readFile src case decodeImage src' of Left err -> putStrLn err @@ -45,7 +45,7 @@ run (Options src w h c) = do case extractDynImage img >>= pixelize w h of Nothing -> return () Just (f,b) -> - let str = if c then img2ascii conv (f,b) else img2ascii conv256 (f,b) + let str = if redcol then img2ascii conv256 (f,b) else img2ascii conv (f,b) in mapM_ (\x -> putStr x >> putStrLn "\x1b[0m") (concat <$> str) chunksof :: Int -> [a] -> [[a]]