[Haskell-cafe] Hsmagick crash

Ron de Bruijn ron at gamr7.com
Mon Jun 8 07:11:57 EDT 2009

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
     (\s -> error $ "(png_file_to_2d_array) " ++ s)
     (\png ->
       putStrLn (show (dimensions 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

More information about the Haskell-Cafe mailing list