
8 Jun
2009
8 Jun
'09
11:11 a.m.
Mark Wassell schreef:
Have you tried http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pngload ? Hi Mark,
I just did: import Codec.Image.PNG png_file_to_2d_array file = do either_error_string_or_png <- loadPNGFile file either (\s -> error $ "(png_file_to_2d_array) " ++ s) (\png -> putStrLn (show (dimensions png)) ) either_error_string_or_png and then calling it gives: *** Exception: (png_file_to_2d_array) failed to parse chunk "IHDR", (line 1, column 1): unexpected 0x0 expecting valid colorType: supported Ct2,Ct6 Best regards, Ron