Copyright | (c) 2017 Pavol Klacansky |
---|---|
License | GPL-3 |
Maintainer | pavol@klacansky.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Library for writting OpenEXR images which support high dynamic range. These images are common in computer graphics, especially ray tracing, and can be used to delay quantization to the post-processing stage.
An example of writting 1x1 ZIP compressed image consisting of a 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
- data Image = ImageRGBF {
- imageWidth :: !Int
- imageHeight :: !Int
- imageData :: Vector PixelRGBF
- data PixelRGBF = PixelRGBF !Float !Float !Float
- data CompressionType
- writeFile :: FilePath -> Image -> CompressionType -> IO ()
Documentation
ImageRGBF | |
|
data CompressionType Source #
NoCompression | No compression applied |
ZipsCompression | DEFLATE lossless compression applied per scanline |
ZipCompression | DEFLATE lossless compression applied per 16 scanlines |
writeFile :: FilePath -> Image -> CompressionType -> IO () Source #
Write an Image
using a CompressionType
to an OpenEXR formatted file