pngload-fixed: Pure Haskell loader for PNG images

[ bsd3, codecs, library ] [ Propose Tags ]

This package provides a simple PNG loader for PNG images. It currently supports 24bit RGB(A) images with no interlacing. This fixed version is the same as pngload-0.1, but without the haskell98 dependency.

[Skip to Readme]


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS] 1.0
Dependencies array, base (>=3 && <4.16), bytestring, mtl, parsec (>=3.0.0), zlib [details]
License BSD-3-Clause
Copyright (c) 2008 Marko Lauronen
Author Marko Lauronen <>
Maintainer Rob Agar <>
Revised Revision 1 made by Bodigrim at 2024-02-07T00:39:56Z
Category Codecs
Uploaded by robagar at 2014-07-22T16:03:49Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1253 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]

Readme for pngload-fixed-1.0

[back to package description]
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

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.