
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL. I know GTK2HS has support for loading images, but does a standalone Haskell (wrapper) module exists for loading images? PNG or TGA would be enough for me. Yes, I could of course just use the GTK2HS OpenGL widget support, but I already have written most of my code on top of GLUT. Or I could use the SDL wrapper, but that one does not work with GHCI under Windows. Thanks, Peter

Peter Verswyvelen wrote:
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL.
I know GTK2HS has support for loading images, but does a standalone Haskell (wrapper) module exists for loading images?
See the message "PNG files" by Tim Newsham, sent to haskell-cafe on the 30th of october. Reinier

Peter Verswyvelen wrote:
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL.
I know GTK2HS has support for loading images, but does a standalone Haskell (wrapper) module exists for loading images?
See the message "PNG files" by Tim Newsham, sent to haskell-cafe on the 30th of october.
The code I wrote is onthe wiki at: http://www.haskell.org/haskellwiki/Library/PNG However, it does not load files, it generates files, and monochrome ones at that. Loading files would be slightly harder since you'd have to support (or at least test for) more options, but the format isn't that complicated.
Reinier
Tim Newsham http://www.thenewsh.com/~newsham/

On 06/11/2007, Peter Verswyvelen
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL.
I know GTK2HS has support for loading images, but does a standalone Haskell (wrapper) module exists for loading images?
PNG or TGA would be enough for me.
The Imlib2 binding (called Imlib-0.1.0) on Hackage provides the necessary tools to load and manipulate images in a variety of formats including PNG, but it's under-documented and a little rough and untested. I'm currently working on a new version with proper documentation, a number of bugfixes, and a somewhat more Haskellish interface. - Cale

On Nov 8, 2007, at 5:42 , Cale Gibbard wrote:
On 06/11/2007, Peter Verswyvelen
wrote: I would like to load 32-bit images (RGB+alpha) for use with GLUT/ OpenGL.
I know GTK2HS has support for loading images, but does a standalone Haskell (wrapper) module exists for loading images?
PNG or TGA would be enough for me.
The Imlib2 binding (called Imlib-0.1.0) on Hackage provides the necessary tools to load and manipulate images in a variety of formats including PNG, but it's under-documented and a little rough and untested.
I'm currently working on a new version with proper documentation, a number of bugfixes, and a somewhat more Haskellish interface.
The gd package also allows loading, manipulating and saving images in several formats, see http://hackage.haskell.org/cgi-bin/hackage-scripts/package/gd /Björn
participants (5)
-
Bjorn Bringert
-
Cale Gibbard
-
Peter Verswyvelen
-
Reinier Lamers
-
Tim Newsham