aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs23
1 files changed, 2 insertions, 21 deletions
diff --git a/app/Main.hs b/app/Main.hs
index d04a3b3..6edc71f 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -1,26 +1,7 @@
module Main where
-import Criterion
-import qualified Data.ByteString as B
-import qualified Data.ByteString.Lazy as BL
-import qualified Data.Text as T
-import Data.Word (Word8)
import PFM
-clamp :: PFMColour -> PPMColour
-clamp (PFMColour ri gi bi) =
- PPMColour (f ri) (f gi) (f bi)
- where
- v s = s * 255.0
- f s = if v s > 255.0 then 255 else fromInteger (round (v s))
-clamp _ = undefined
-
-clampImage :: PFMImage -> PPMImage
-clampImage (PFMImage w h c) =
- PPMImage w h . reverse $ fmap clamp <$> c
-
main :: IO ()
-main = do
- -- s <- B.readFile "/home/yannherklotz/Imperial/AdvancedGraphics/coursework1/CO417-Assignment1/UrbanProbe/urbanEM_latlong.pfm"
- s <- B.readFile "/home/yannherklotz/Downloads/memorial.pfm"
- BL.writeFile "random.ppm" . encodePPM . clampImage . parse $ s
+main =
+ putStrLn "Work in progress..."