BaH.EXRLoader: Functions Types Modinfo Source  

EXR Loader

The EXR loader module provides the ability to load EXR format pixmaps.

This module adds BlitzMax support for OpenEXR images.

OpenEXR is a high dynamic-range (HDR) image file format developed by motion-picture special effects company, Industrial Light and Magic (ILM).

OpenEXR's features include:

Usage

For basic usage, you only need to Import the module, and then use LoadPixmap as you normally would. BlitzMax chooses the correct loader to load a particular file.

Local pixmap:TPixmap = LoadPixmap("XYZ_YC.exr")

For more advanced use, TEXRImage provides a LoadImage function, which will load the EXR image and allow you to process it to change settings such as gamma, exposure, defog, and knee. Note that these methods don't change the actual image data, but rather how the embedded pixmap is constructed.
Since an single EXR image pixel attribute (like Red) can be represented by a 32 bit float value, these need to be clamped to a 0 to 255 integer range for the pixmap.

Functions

Function isEXRFile:Int(filename:String)
DescriptionReturns true if filename is a valid EXR file.

Function isTiledEXRFile:Int(filename:String)
DescriptionReturns true if filename is a valid tiled EXR file.

Types

Type TEXRImage
DescriptionAn EXR image.
InformationAllows for the manipulation of the EXR image data.
Field pixmap:TPixmap
DescriptionA pixmap representation of the EXR image.
Method defog:Float()
DescriptionReturns the current defog setting.
InformationValue subtracted from pixel values to compensate for fogging due to stray light in the recording device. Default = 0.
Method exposure:Float()
DescriptionReturns the current exposure setting.
InformationThe apparent exposure of the image on the display. It lightens or darkens the displayed image, allowing you to reveal detail in the high or low end. Default = 0.
Method gamma:Float()
DescriptionReturns the current gamma setting.
InformationCoefficient to use for gamma correcting the pixel values. Default = 2.2.
Method height:Int()
DescriptionReturns the height of the EXR image.
Method kneeHigh:Float()
DescriptionReturns the current kneehigh setting.
InformationPixel values between kneehigh and kneelow set the white level of the displayed image, determining which value is mapped to the maximum intensity of the monitor. Default = 0.
Method kneeLow:Float()
DescriptionReturns the current kneelow setting.
InformationPixel values between kneehigh and kneelow set the white level of the displayed image, determining which value is mapped to the maximum intensity of the monitor. Default = 0.
Method setDefog(value:Float)
DescriptionSets the defog value.
Method setExposure(value:Float)
DescriptionSets the exposure value.
Method setGamma(value:Float)
DescriptionSets the gamma value.
Method setKneeHigh(value:Float)
DescriptionSets te kneehigh value.
Method setKneeLow(value:Float)
DescriptionSets the kneelow value.
Method width:Int()
DescriptionReturns the width of the EXR image.
Function LoadImage:TEXRImage(filename:String)
DescriptionLoads an EXR image.

Module Information

Version1.00
LicenseBSD
CopyrightOpenEXR - 2006 Industrial Light & Magic, a division of Lucasfilm Entertainment Company Ltd.
CopyrightWrapper - 2007 Bruce A Henderson
ModserverBRL
History1.00
HistoryInitial Release.
CC_OPTS-fexceptions
CC_OPTS-DHAVE_PTHREAD
CC_OPTS-DHAVE_POSIX_SEMAPHORES
CC_OPTS-DHAVE_PTHREAD
CC_OPTS-DHAVE_DARWIN