Skip to content

keera-studios/pngload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

=====================================================================

NOTE by Ivan Perez (Keera Studios):

We are not the authors of this library (see pngload.cabal for details).

This library has been made available only because the one in hackage does not
compile anymore. The publication should not be taken as a sign that this will
be maintained. This library was used by our Game IDE, Gale; over the years,
using it gave us a fair amount of headaches (due to not being able to load all
the kinds of PNGs we needed). That being said, if you would like to fix it and
take over or send a pull request, feel free.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published