[Haskell-cafe] PNG sample on haskellwiki
Hi, I tried out the code on this page http://haskell.org/haskellwiki/Library/PNGbut the png file that'e emitted does not seem to open properly with image viewing tools. Has anyone tried it out? I added this bit for supplying the data for image creation - count=100 row = take count (cycle [True,False]) rows = take 100 (repeat row) image = png rows main=writeFile hello.png image -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] PNG sample on haskellwiki
I don't know about that code, but have had good experiences on two projects using the DevIL binding library found on hackage [1]. I tried pngload [2] originally, but that isn't full featured enough for real use. iirc, stb-image [3] had a similar issue of being too bare-bones; the haddock comments agree (PNG 8-bit only). In summary, thank you Luke for a good package. Cheers, Thomas [1] http://hackage.haskell.org/package/Codec-Image-DevIL [2] http://hackage.haskell.org/package/pngload [3] http://hackage.haskell.org/packages/archive/stb-image/0.2/doc/html/Codec-Image-STB.html On Mon, Jul 12, 2010 at 9:51 AM, C K Kashyap ckkash...@gmail.com wrote: Hi, I tried out the code on this page http://haskell.org/haskellwiki/Library/PNG but the png file that'e emitted does not seem to open properly with image viewing tools. Has anyone tried it out? I added this bit for supplying the data for image creation - count=100 row = take count (cycle [True,False]) rows = take 100 (repeat row) image = png rows main=writeFile hello.png image -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] PNG sample on haskellwiki
Thanks Thomas for the resources ... particularly [3] ... it seems to have a link to a standalone 'C' code that does jpeg and png decoding! I'd actually like to see the example on Haskell wiki work - my agenda is two fold, familiarity with dealing with binary data in Haskell and also understanding PNG ... I think I'll have to do it the hard way now - look at the PNG spec and see what's wrong in the file. On Mon, Jul 12, 2010 at 10:41 PM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: I don't know about that code, but have had good experiences on two projects using the DevIL binding library found on hackage [1]. I tried pngload [2] originally, but that isn't full featured enough for real use. iirc, stb-image [3] had a similar issue of being too bare-bones; the haddock comments agree (PNG 8-bit only). In summary, thank you Luke for a good package. Cheers, Thomas [1] http://hackage.haskell.org/package/Codec-Image-DevIL [2] http://hackage.haskell.org/package/pngload [3] http://hackage.haskell.org/packages/archive/stb-image/0.2/doc/html/Codec-Image-STB.html On Mon, Jul 12, 2010 at 9:51 AM, C K Kashyap ckkash...@gmail.com wrote: Hi, I tried out the code on this page http://haskell.org/haskellwiki/Library/PNG but the png file that'e emitted does not seem to open properly with image viewing tools. Has anyone tried it out? I added this bit for supplying the data for image creation - count=100 row = take count (cycle [True,False]) rows = take 100 (repeat row) image = png rows main=writeFile hello.png image -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Regards, Kashyap ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe