O'Reilly logo

Haskell Data Analysis Cookbook by Nishant Shukla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Manipulating images in parallel using Repa

Repa is a powerful library for manipulating high-dimensional arrays in parallel. We will use it to read and edit the pixels of an image.

Getting ready

Install Developer's Image Library (DevIL), a cross-platform image manipulation toolkit. It can be downloaded from http://openil.sourceforge.net/download.php or through apt-get on Debian systems as follows:

$ sudo apt-get install libdevil-dev

Install the Repa package from cabal for the DevIL toolkit as follows:

$ cabal install repa-devil

Create two images named image1.png and image2.png that have the same dimensions, which are shown as follows:

Getting ready

Here comes the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required