[Haskell-cafe] Reading images

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri Jan 21 05:18:46 EST 2005

On Fri, 2005-01-21 at 07:25 +0000, Adrian Hey wrote:
> On Thursday 20 Jan 2005 7:35 pm, Dmitri Pissarenko wrote:
> > In my program, I need ONLY to read an image and to transform it into such
> > matrix.
> >
> > Which graphics library can you recommend, if no other image manipulation
> > operations are required?
> These might help..
>  http://homepages.nildram.co.uk/~ahey/HLibs/Multimedia.SDL.Core/
>  http://homepages.nildram.co.uk/~ahey/HLibs/Multimedia.SDL.Image/
> What you'll get is an SDL surface (C data structure), so
> you'll have to write some code to read it if you want a Haskell
> array.

We have a similar binding to Gdk's pixmap features in gtk2hs. I was
thinking it would probably not be too hard to provide an instance of
MArray for these bitmap C structures. That'd make it much easier to use
and if we can do it right should be zero-copy (ie quick).


More information about the Haskell-Cafe mailing list