The pngload package

[Tags:bsd3, library]

This package provides a simple PNG loader for PNG images. It currently supports 24bit RGB(A) images with no interlacing.


[Skip to Readme]

Properties

Versions 0.1
Dependencies array, base (>=3), bytestring, haskell98, mtl, parsec (>=3.0.0), zlib [details]
License BSD3
Copyright (c) 2008 Marko Lauronen
Author Marko Lauronen <marko.lauronen@pp1.inet.fi>
Maintainer Marko Lauronen <marko.lauronen@pp1.inet.fi>
Stability experimental
Category Codecs
Uploaded Mon Jun 2 17:28:09 UTC 2008 by MarkoLauronen
Distributions NixOS:0.1
Downloads 542 total (9 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for pngload

Readme for pngload-0.1

This is the beginnings of a pure Haskell loader for PNG images. It
stores the uncompressed image in a StorableArray (Int,Int) Word8, so
it should be convenient to use as a texture loader in OpenGL
applications since you can get a Ptr Word8 to the image data easily.

The performance is reasonable (the following run loads an 1.5megabyte
1024x768 24bit PNG image and writes out the raw bytes on a 2GHz
MacBook):

Mars2:PNG marko$ time ./Test scenery_1

real	0m0.315s
user	0m0.267s
sys	0m0.027s

Source for the test is in Test.hs.

Note that the library has not been tested with every possible kind of
PNG images, so use at your own risk.