Library for writing images in OpenEXR HDR file format.

Version on this page:
LTS Haskell 15.14:
Stackage Nightly 2020-05-26:
Latest on Hackage:

See all snapshots openexr-write appears in

GPL-3.0-only licensed by Pavol Klacansky
Maintained by [email protected]

Module documentation for

This version can be pinned in stack with:[email protected]:879417743fcfa3a09d2a624c2bdcfc1fe9e86692fe369cf5f946c45ef04592d3,1845

Haskell OpenEXR Library

This library can write colored images which use floating point values into OpenEXR (v2) high-dynamic-range file format.

Supported features:

  • scanline format
  • compression (ZIPS, ZIP)
  • pixel format (RGB float32)


Modify project’s stack.yaml by adding path to openexr-write package.

- '.'
- path/openexr-write

An image can be written by calling writeFile function. For example, following code stores a compressed image consisting of one red pixel.

module Main where

import qualified Data.Vector      as V
import qualified Graphics.OpenEXR as EXR

main :: IO ()
main = do
        let image = EXR.ImageRGBF 1 1 (V.fromList [EXR.PixelRGBF 1.0 0.0 0.0])
        EXR.writeFile "image.exr" image EXR.ZipCompression