instance Show Color where
  show Transparent = " "
  show Black       = "X"
  show White       = "-"

readRow :: [Int] -> Int -> ([Int], [Int])
readRow pixels w = foldl (\(result, h:t) i -> (result ++ [h], t)) ([], pixels) [1 .. w]

readLayer :: [Int] -> Int -> Int -> ([[Int]], [Int])