Divooka Reference

HDR Pixel Image

46 nodes

On this page 46

Make HDR Pixel Image

Function

Overload 1 of 7

Signature
HdrPixelImage() -> Hdr Pixel Image
HdrPixelImage HdrPixelImage()

This node carries no documentation.

Returns

HDR Pixel ImageHdr Pixel Image

Remarks

Required for serialization and empty values.

Overload 2 of 7

Signature
HdrPixelImage -> Hdr Pixel Image
    width: Integer
    height: Integer
HdrPixelImage HdrPixelImage(int width, int height)

Creates a blank HDR image of the given size, with every pixel transparent black (all channels 0).

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.

Returns

HDR Pixel ImageHdr Pixel Image

Overload 3 of 7

Signature
HdrPixelImage -> Hdr Pixel Image
    width: Integer
    height: Integer
    value: Hdr Color Element
HdrPixelImage HdrPixelImage(
    int width,
    int height,
    HdrColorElement value)

Creates an HDR image of the given size with every pixel set to one color.

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.
valueHdr Color Element—The color every pixel starts with.

Returns

HDR Pixel ImageHdr Pixel Image

Overload 4 of 7

Signature
HdrPixelImage(pixels: Hdr Color Element Array Array) -> Hdr Pixel Image
HdrPixelImage HdrPixelImage(HdrColorElement[][] pixels)

This node carries no documentation.

Parameters

nametypedefaultdescription
pixelsHdr Color Element Array Array—Direct reference without copy.

Returns

HDR Pixel ImageHdr Pixel Image

Overload 5 of 7

Signature
HdrPixelImage -> Hdr Pixel Image
    width: Integer
    height: Integer
    flat: Hdr Color Element Array
HdrPixelImage HdrPixelImage(
    int width,
    int height,
    HdrColorElement[] flat)

Creates an HDR image from a single flat run of pixels, read row by row from the top-left corner; the same as HdrPixelImage.FromFlatArray.

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.
flatHdr Color Element Array—Exactly Width × Height pixels; the first Width are the top row.

Returns

HDR Pixel ImageHdr Pixel Image

Remarks

The pixels are copied, so later changes to Flat do not affect the image.

Overload 6 of 7

Signature
HdrPixelImage -> Hdr Pixel Image
    image: Pixel Image
    options: Pixel To Hdr Image Options
HdrPixelImage HdrPixelImage(
    PixelImage image,
    PixelToHdrImageOptions options)

Converts sRGB bytes into linear floating-point RGB by default.

Parameters

nametypedefaultdescription
imagePixel Image—
optionsPixel To Hdr Image Options—

Returns

HDR Pixel ImageHdr Pixel Image

Overload 7 of 7

Signature
HdrPixelImage -> Hdr Pixel Image
    image: Pixel Image
    rgbConverter: Func<Vector3, Vector3>
HdrPixelImage HdrPixelImage(
    PixelImage image,
    Func<Vector3, Vector3> rgbConverter)

Converts normalized PixelImage RGB through a caller-provided conversion function.

Parameters

nametypedefaultdescription
imagePixel Image—
rgbConverterFunc<Vector3, Vector3>—

Returns

HDR Pixel ImageHdr Pixel Image

Remarks

The converter completely replaces built-in transfer-function conversion. Alpha is copied separately as a normalized value.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Clone

Function

Makes an independent copy of the image, so editing the copy leaves the original untouched.

Signature
Clone(HDR Pixel Image: Hdr Pixel Image) -> Hdr Pixel Image
HdrPixelImage Clone(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Columns

Function

Width of the image in pixels, that is, the number of pixels in each row.

Signature
Columns(HDR Pixel Image: Hdr Pixel Image) -> Integer
int Columns(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultInteger
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Item

Function

Overload 1 of 2

Signature
Item -> Hdr Color Element
    HDR Pixel Image: Hdr Pixel Image
    index: Integer
HdrColorElement Item(HdrPixelImage Hdr Pixel Image, int index)

Reads or writes a pixel by its position in row-major order, counting from 0 at the top-left corner along each row in turn, so index y * Columns + x is the pixel at column x of row y.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
indexInteger—The pixel's position, from 0 to HdrPixelImage.Columns × HdrPixelImage.Rows - 1.

Returns

resultHdr Color Element

Overload 2 of 2

Signature
Item -> Hdr Color Element
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
HdrColorElement Item(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

Reads or writes the pixel at a column and row, the same as HdrPixelImage.GetHdrColor and HdrPixelImage.SetHdrColor.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—Column, counted from 0 at the left edge.
yInteger—Row, counted from 0 at the top edge.

Returns

resultHdr Color Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Pixels

Function

This node carries no documentation.

Signature
Pixels(HDR Pixel Image: Hdr Pixel Image) -> Hdr Color Element Array Array
HdrColorElement[][] Pixels(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultHdr Color Element Array Array

Remarks

Row-major data in the form Pixels[y][x].

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Raw

Function

The whole image as raw bytes, four little-endian 32-bit floats per pixel (red, green, blue, alpha), row by row from the top-left corner; see HdrPixelImage.ToTightlyPackedFloat32LittleEndianBytes.

Signature
Raw(HDR Pixel Image: Hdr Pixel Image) -> Byte Array
byte[] Raw(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultByte Array

Remarks

Every read builds a new copy of the pixel data, so read it once and keep the result rather than reading it inside a loop.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Rows

Function

Height of the image in pixels, that is, the number of rows.

Signature
Rows(HDR Pixel Image: Hdr Pixel Image) -> Integer
int Rows(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultInteger
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Get Color

Function

Returns the fixed default tone-mapped preview color.

Signature
GetColor -> Color
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
ColorElement GetColor(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—
yInteger—

Returns

resultColor
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Get Float Value

Function

Returns fixed-default tone-mapped linear luminance.

Signature
GetFloatValue -> Low Accuracy Number
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
float GetFloatValue(HdrPixelImage Hdr Pixel Image, int x, int y)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—
yInteger—

Returns

resultLow Accuracy Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Get Gray Byte

Function

Returns fixed-default tone-mapped linear luminance as an 8-bit value.

Signature
GetGrayByte -> Byte
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
byte GetGrayByte(HdrPixelImage Hdr Pixel Image, int x, int y)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—
yInteger—

Returns

resultByte
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Get Hdr Color

Function

The full-precision HDR color of one pixel, exactly as stored.

Signature
GetHdrColor -> Hdr Color Element
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
HdrColorElement GetHdrColor(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—Column, counted from 0 at the left edge.
yInteger—Row, counted from 0 at the top edge.

Returns

resultHdr Color Element
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Get Hdr Luminance

Function

Returns luminance directly from stored RGB values without transfer conversion.

Signature
GetHdrLuminance -> Low Accuracy Number
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
float GetHdrLuminance(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—
yInteger—

Returns

resultLow Accuracy Number
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Get Summary

Function

A one-line description of the image: its size, the lowest and highest value of each channel, and the range of its Rec. 709 luminance.

Signature
GetSummary(HDR Pixel Image: Hdr Pixel Image) -> Text
string GetSummary(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultText

Remarks

NaN samples are skipped when finding each channel's range and non-finite luminance is skipped for the luminance range, so a channel with nothing else to report shows NaN. An empty image is reported as such.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Histogram

Function

Returns a normalized histogram of stored linear luminance.
Bins span the actual finite luminance range of the image.
The returned values sum to 1 when at least one finite sample exists.

Signature
Histogram -> Number Array
    HDR Pixel Image: Hdr Pixel Image
    bars: Integer
double[] Histogram(HdrPixelImage Hdr Pixel Image, int bars)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
barsInteger—

Returns

resultNumber Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Is Within Display Range

Function

Whether every RGB sample, scaled by Exposure Multiplier, already lies
at or below 1.0 — so there is no range for a tone-mapping operator to compress.

Signature
IsWithinDisplayRange -> Truth
    HDR Pixel Image: Hdr Pixel Image
    exposureMultiplier: Low Accuracy Number
bool IsWithinDisplayRange(
    HdrPixelImage Hdr Pixel Image,
    float exposureMultiplier = 1f)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
exposureMultiplierLow Accuracy Number1The linear exposure factor the conversion will apply.

Returns

resultTruth

Remarks

NaN counts as in range because every preview path maps it to zero rather than tone
mapping it; positive infinity counts as out of range because it is the extreme case of
the thing tone mapping exists for. Alpha is not considered: it is never tone mapped.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Max

Function

This node carries no documentation.

Signature
Max -> Number
    HDR Pixel Image: Hdr Pixel Image
    channel: Integer
double Max(HdrPixelImage Hdr Pixel Image, int channel)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
channelInteger—0-3

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Min

Function

This node carries no documentation.

Signature
Min -> Number
    HDR Pixel Image: Hdr Pixel Image
    channel: Integer
double Min(HdrPixelImage Hdr Pixel Image, int channel)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
channelInteger—0-3

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Save As Portable Float Map

Function

Writes the image as Portable FloatMap (.pfm).

Signature
SaveAsPortableFloatMap
    HDR Pixel Image: Hdr Pixel Image
    path: Text
    options: Portable Float Map Image Writer Options
void SaveAsPortableFloatMap(
    HdrPixelImage Hdr Pixel Image,
    string path,
    PortableFloatMapImageWriterOptions options)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
pathText—
optionsPortable Float Map Image Writer Options—

Remarks

Unlike Radiance RGBE this keeps full 32-bit float precision per channel and can represent
negative values, at the cost of a much larger file.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Save As Radiance Hdr

Function

Writes the image as a Radiance RGBE (.hdr) file, the common format for HDR environment maps; alpha is not stored.

Signature
SaveAsRadianceHdr
    HDR Pixel Image: Hdr Pixel Image
    path: Text
    options: Radiance Hdr Image Writer Options
void SaveAsRadianceHdr(
    HdrPixelImage Hdr Pixel Image,
    string path,
    RadianceHdrImageWriterOptions options)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
pathText—The file to create or overwrite.
optionsRadiance Hdr Image Writer Options—Encoder settings; null uses the defaults.

Remarks

RGBE shares one exponent between the three channels, so it is compact but less precise than HdrPixelImage.SaveAsPortableFloatMap, and it cannot hold negative values.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Save As Text

Function

The image as Base64 text, encoding the same bytes as HdrPixelImage.SerializeIntoBytes, for storing an image inside a text document.

Signature
SaveAsText(HDR Pixel Image: Hdr Pixel Image) -> Text
string SaveAsText(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Serialize Into Bytes

Function

Serializes the image into Divooka's own binary form, as written by HdrPixelImage.WriteToStream, preserving every float exactly.

Signature
SerializeIntoBytes(HDR Pixel Image: Hdr Pixel Image) -> Byte Array
byte[] SerializeIntoBytes(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultByte Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Set Hdr Color

Function

Replaces the HDR color of one pixel, changing the image in place.

Signature
SetHdrColor
    HDR Pixel Image: Hdr Pixel Image
    x: Integer
    y: Integer
    color: Hdr Color Element
void SetHdrColor(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y,
    HdrColorElement color)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
xInteger—Column, counted from 0 at the left edge.
yInteger—Row, counted from 0 at the top edge.
colorHdr Color Element—The new color, stored exactly as given.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

To Flat Array

Function

Copies all pixels into a single array, row by row from the top-left corner, so pixel (x, y) is at index y * Columns + x.

Signature
ToFlatArray(HDR Pixel Image: Hdr Pixel Image) -> Hdr Color Element Array
HdrColorElement[] ToFlatArray(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultHdr Color Element Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

To Pixel Image

Function

Overload 1 of 3

Signature
ToPixelImage(HDR Pixel Image: Hdr Pixel Image) -> Pixel Image
PixelImage ToPixelImage(HdrPixelImage Hdr Pixel Image)

Converts the image to an 8-bit sRGB image for display, choosing the exposure automatically from the image's average brightness and compressing highlights with a luminance-based curve that keeps colors from washing out to white.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultPixel Image

Remarks

Exposure places the image's log-average luminance at middle gray (0.18), so a few very bright pixels such as the sun barely affect it. Negative values become 0 and alpha is clamped to 0-1. Use HdrPixelImage.ToPixelImage for a fixed exposure and a chosen tone-mapping operator.

Overload 2 of 3

Signature
ToPixelImage -> Pixel Image
    HDR Pixel Image: Hdr Pixel Image
    options: Hdr To Pixel Image Options
PixelImage ToPixelImage(
    HdrPixelImage Hdr Pixel Image,
    HdrToPixelImageOptions options)

Converts the image to an 8-bit image with explicit control over exposure, tone mapping, transfer functions and alpha.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
optionsHdr To Pixel Image Options—The conversion settings; null uses HdrToPixelImageOptions.Default (ACES tone mapping, linear to sRGB, no exposure change).

Returns

resultPixel Image

Remarks

Each pixel goes through: source transfer decode, exposure (in stops), optional clamping of negatives, the tone-mapping operator, clamping to 0-1, destination transfer encode and rounding to a byte. NaN and negative infinity become 0 and positive infinity becomes 1.

Overload 3 of 3

Signature
ToPixelImage -> Pixel Image
    HDR Pixel Image: Hdr Pixel Image
    transferFunction: Func<Vector3, Color>
PixelImage ToPixelImage(
    HdrPixelImage Hdr Pixel Image,
    Func<Vector3, ColorElement> transferFunction)

Converts the image to an 8-bit image using your own conversion for every pixel.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
transferFunctionFunc<Vector3, Color>—Turns one pixel's stored red, green and blue into the 8-bit color to write.

Returns

resultPixel Image

Remarks

The function receives only red, green and blue (in X, Y and Z, as stored), so the HDR alpha is discarded; the alpha of each returned color is used as is.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

To Portable Float Map Bytes

Function

Encodes the image as a Portable FloatMap (.pfm) file in memory, producing the same bytes HdrPixelImage.SaveAsPortableFloatMap writes to disk.

Signature
ToPortableFloatMapBytes -> Byte Array
    HDR Pixel Image: Hdr Pixel Image
    options: Portable Float Map Image Writer Options
byte[] ToPortableFloatMapBytes(
    HdrPixelImage Hdr Pixel Image,
    PortableFloatMapImageWriterOptions options)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
optionsPortable Float Map Image Writer Options—Encoder settings; null uses the defaults.

Returns

resultByte Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

To Radiance Hdr Bytes

Function

Encodes the image as a Radiance RGBE (.hdr) file in memory, producing the same bytes HdrPixelImage.SaveAsRadianceHdr writes to disk.

Signature
ToRadianceHdrBytes -> Byte Array
    HDR Pixel Image: Hdr Pixel Image
    options: Radiance Hdr Image Writer Options
byte[] ToRadianceHdrBytes(
    HdrPixelImage Hdr Pixel Image,
    RadianceHdrImageWriterOptions options)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
optionsRadiance Hdr Image Writer Options—Encoder settings; null uses the defaults.

Returns

resultByte Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

To Tightly Packed Float32little Endian Bytes

Function

The whole image as raw bytes: four little-endian 32-bit floats per pixel (red, green, blue, alpha), row by row from the top-left corner with no header or padding.

Signature
ToTightlyPackedFloat32LittleEndianBytes(HDR Pixel Image: Hdr Pixel Image) -> Byte Array
byte[] ToTightlyPackedFloat32LittleEndianBytes(HdrPixelImage Hdr Pixel Image)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—

Returns

resultByte Array

Remarks

The values are written exactly, NaN and infinity included; HdrPixelImage.FromTightlyPackedFloat32LittleEndianBytes reads them back.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Transform Hdr Data

Function

Overload 1 of 2

Signature
TransformHdrData
    HDR Pixel Image: Hdr Pixel Image
    transformer: Func<Hdr Color Element, Hdr Color Element>
void TransformHdrData(
    HdrPixelImage Hdr Pixel Image,
    Func<HdrColorElement, HdrColorElement> transformer)

Applies an element transform atomically using a deep copy.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
transformerFunc<Hdr Color Element, Hdr Color Element>—

Overload 2 of 2

Signature
TransformHdrData
    HDR Pixel Image: Hdr Pixel Image
    transformer: Func<Integer, Integer, Hdr Color Element, Hdr Color Element>
void TransformHdrData(
    HdrPixelImage Hdr Pixel Image,
    Func<int, int, HdrColorElement, HdrColorElement> transformer)

Applies a coordinate-aware element transform atomically using a deep copy.

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
transformerFunc<Integer, Integer, Hdr Color Element, Hdr Color Element>—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Update Color Data

Function

Performs a deliberately lossy sRGB-preview update and converts the result back into linear HDR data.

Signature
UpdateColorData
    HDR Pixel Image: Hdr Pixel Image
    updater: Func<Color Array Array, Color Array Array>
void UpdateColorData(
    HdrPixelImage Hdr Pixel Image,
    Func<ColorElement[][], ColorElement[][]> updater)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
updaterFunc<Color Array Array, Color Array Array>—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Update Hdr Data

Function

Applies a shape-preserving or shape-changing HDR update from a deep copy.

Signature
UpdateHdrData
    HDR Pixel Image: Hdr Pixel Image
    updater: Func<Hdr Color Element Array Array, Hdr Color Element Array Array>
void UpdateHdrData(
    HdrPixelImage Hdr Pixel Image,
    Func<HdrColorElement[][], HdrColorElement[][]> updater)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
updaterFunc<Hdr Color Element Array Array, Hdr Color Element Array Array>—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Write Portable Float Map

Function

Encodes the image as a Portable FloatMap (.pfm) file into a stream, starting at its current position; the stream is left open.

Signature
WritePortableFloatMap
    HDR Pixel Image: Hdr Pixel Image
    stream: Stream
    options: Portable Float Map Image Writer Options
void WritePortableFloatMap(
    HdrPixelImage Hdr Pixel Image,
    Stream stream,
    PortableFloatMapImageWriterOptions options)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
streamStream—A writable stream to receive the file.
optionsPortable Float Map Image Writer Options—Encoder settings; null uses the defaults.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Write Radiance Hdr

Function

Encodes the image as a Radiance RGBE (.hdr) file into a stream, starting at its current position; the stream is left open.

Signature
WriteRadianceHdr
    HDR Pixel Image: Hdr Pixel Image
    stream: Stream
    options: Radiance Hdr Image Writer Options
void WriteRadianceHdr(
    HdrPixelImage Hdr Pixel Image,
    Stream stream,
    RadianceHdrImageWriterOptions options)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
streamStream—A writable stream to receive the file.
optionsRadiance Hdr Image Writer Options—Encoder settings; null uses the defaults.
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Write Tightly Packed Float32little Endian

Function

Writes tightly packed little-endian float RGBA data without a header.

Signature
WriteTightlyPackedFloat32LittleEndian -> Large Integer
    HDR Pixel Image: Hdr Pixel Image
    stream: Stream
long WriteTightlyPackedFloat32LittleEndian(
    HdrPixelImage Hdr Pixel Image,
    Stream stream)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
streamStream—

Returns

resultLarge Integer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Write To Stream

Function

The binary format uses an eight-byte HDR-specific magic, version, dimensions, Int64 payload length, then row-wise little-endian IEEE-754 RGBA floats.

Signature
WriteToStream -> Large Integer
    HDR Pixel Image: Hdr Pixel Image
    writer: BinaryWriter
long WriteToStream(
    HdrPixelImage Hdr Pixel Image,
    BinaryWriter writer)

Parameters

nametypedefaultdescription
HDR Pixel ImageHdr Pixel Image—
writerBinaryWriter—

Returns

resultLarge Integer
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Allocate Pixels

Function

Allocates a new [row][column] HDR pixel grid of the given size, optionally filled with one color.

Signature
AllocatePixels -> Hdr Color Element Array Array
    width: Integer
    height: Integer
    value: Optional Hdr Color Element
HdrColorElement[][] AllocatePixels(
    int width,
    int height,
    HdrColorElement? value)

Parameters

nametypedefaultdescription
widthInteger—Number of pixels in each row.
heightInteger—Number of rows.
valueOptional Hdr Color Element—The fill color; null leaves every pixel transparent black (all channels 0).

Returns

resultHdr Color Element Array Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

From Flat Array

Function

Creates an HDR image from a single array of pixels laid out row by row from the top-left corner, the inverse of HdrPixelImage.ToFlatArray.

Signature
FromFlatArray -> Hdr Pixel Image
    width: Integer
    height: Integer
    flat: Hdr Color Element Array
HdrPixelImage FromFlatArray(
    int width,
    int height,
    HdrColorElement[] flat)

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.
flatHdr Color Element Array—Exactly Width × Height pixels; the first Width are the top row.

Returns

resultHdr Pixel Image

Remarks

The pixels are copied, so later changes to Flat do not affect the image.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

From Pixel Image

Function

Overload 1 of 2

Signature
FromPixelImage -> Hdr Pixel Image
    image: Pixel Image
    options: Pixel To Hdr Image Options
HdrPixelImage FromPixelImage(
    PixelImage image,
    PixelToHdrImageOptions options)

Converts an 8-bit image to HDR, turning each byte into a 0-1 value and, by default, decoding the sRGB curve so the result is in linear light.

Parameters

nametypedefaultdescription
imagePixel Image—The 8-bit image to convert.
optionsPixel To Hdr Image Options—The source and destination transfer functions; null uses PixelToHdrImageOptions.Default (sRGB to linear).

Returns

resultHdr Pixel Image

Remarks

Alpha is copied as a 0-1 value without conversion. The result is a new image; the source is not changed.

Overload 2 of 2

Signature
FromPixelImage -> Hdr Pixel Image
    image: Pixel Image
    rgbConverter: Func<Vector3, Vector3>
HdrPixelImage FromPixelImage(
    PixelImage image,
    Func<Vector3, Vector3> rgbConverter)

Converts normalized PixelImage RGB through a caller-provided conversion function.

Parameters

nametypedefaultdescription
imagePixel Image—
rgbConverterFunc<Vector3, Vector3>—

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

From Tightly Packed Float32little Endian Bytes

Function

Creates an HDR image from raw bytes holding four little-endian 32-bit floats per pixel (red, green, blue, alpha), row by row from the top-left corner with no header or padding.

Signature
FromTightlyPackedFloat32LittleEndianBytes -> Hdr Pixel Image
    width: Integer
    height: Integer
    rawBytes: Byte Array
HdrPixelImage FromTightlyPackedFloat32LittleEndianBytes(
    int width,
    int height,
    byte[] rawBytes)

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.
rawBytesByte Array—Exactly Width × Height × 16 bytes.

Returns

resultHdr Pixel Image

Remarks

The inverse of HdrPixelImage.ToTightlyPackedFloat32LittleEndianBytes. The values are copied exactly, NaN and infinity included.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Initialize Black Image

Function

Creates an HDR image of the given size filled with opaque black (red, green and blue 0, alpha 1).

Signature
InitializeBlackImage -> Hdr Pixel Image
    width: Integer
    height: Integer
HdrPixelImage InitializeBlackImage(int width, int height)

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Initialize From Bytes

Function

Rebuilds an image from bytes produced by HdrPixelImage.SerializeIntoBytes.

Signature
InitializeFromBytes(data: Byte Array) -> Hdr Pixel Image
HdrPixelImage InitializeFromBytes(byte[] data)

Parameters

nametypedefaultdescription
dataByte Array—The serialized image, with nothing after it.

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Initialize Image

Function

Creates an HDR image of the given size with every pixel set to one color.

Signature
InitializeImage -> Hdr Pixel Image
    width: Integer
    height: Integer
    value: Hdr Color Element
HdrPixelImage InitializeImage(
    int width,
    int height,
    HdrColorElement value)

Parameters

nametypedefaultdescription
widthInteger—Number of columns, in pixels.
heightInteger—Number of rows, in pixels.
valueHdr Color Element—The color every pixel starts with.

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Load From File

Function

Overload 1 of 3

Signature
LoadFromFile(path: Text) -> Hdr Pixel Image
HdrPixelImage LoadFromFile(string path)

Loads any format accepted by StbImageSharp's floating-point decoder.

Parameters

nametypedefaultdescription
pathText—

Returns

resultHdr Pixel Image

Remarks

Values returned by StbImageSharp are stored without further conversion.
This should support Radiance HDR (.pic, .hdr) file format.

Overload 2 of 3

Signature
LoadFromFile -> Hdr Pixel Image
    path: Text
    sourceTransfer: Color Transfer Function
    destinationTransfer: Color Transfer Function
HdrPixelImage LoadFromFile(
    string path,
    ColorTransferFunction sourceTransfer,
    ColorTransferFunction destinationTransfer)

Loads an image and converts its decoded RGB values between built-in transfer functions.

Parameters

nametypedefaultdescription
pathText—
sourceTransferColor Transfer Function—
destinationTransferColor Transfer Function—

Returns

resultHdr Pixel Image

Overload 3 of 3

Signature
LoadFromFile -> Hdr Pixel Image
    path: Text
    rgbConverter: Func<Vector3, Vector3>
HdrPixelImage LoadFromFile(
    string path,
    Func<Vector3, Vector3> rgbConverter)

Loads an image and applies a caller-provided conversion to decoded RGB values.

Parameters

nametypedefaultdescription
pathText—
rgbConverterFunc<Vector3, Vector3>—

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Load From File Buffer

Function

Overload 1 of 3

Signature
LoadFromFileBuffer(fileData: Byte Array) -> Hdr Pixel Image
HdrPixelImage LoadFromFileBuffer(byte[] fileData)

Decodes an image file held in memory into HDR values, in any format StbImageSharp's floating-point decoder accepts, such as Radiance .hdr.

Parameters

nametypedefaultdescription
fileDataByte Array—The complete file contents.

Returns

resultHdr Pixel Image

Remarks

Values returned by the decoder are stored without further conversion.

Overload 2 of 3

Signature
LoadFromFileBuffer -> Hdr Pixel Image
    fileData: Byte Array
    sourceTransfer: Color Transfer Function
    destinationTransfer: Color Transfer Function
HdrPixelImage LoadFromFileBuffer(
    byte[] fileData,
    ColorTransferFunction sourceTransfer,
    ColorTransferFunction destinationTransfer)

Decodes an image file held in memory into HDR values, then converts the decoded red, green and blue from one transfer function to another.

Parameters

nametypedefaultdescription
fileDataByte Array—The complete file contents.
sourceTransferColor Transfer Function—The transfer function the decoded values are in.
destinationTransferColor Transfer Function—The transfer function to store them in.

Returns

resultHdr Pixel Image

Remarks

Alpha is stored as decoded. When the two transfer functions are the same, the values are left unchanged.

Overload 3 of 3

Signature
LoadFromFileBuffer -> Hdr Pixel Image
    fileData: Byte Array
    rgbConverter: Func<Vector3, Vector3>
HdrPixelImage LoadFromFileBuffer(
    byte[] fileData,
    Func<Vector3, Vector3> rgbConverter)

Decodes an image file held in memory into HDR values, passing each pixel's decoded red, green and blue through a conversion of your choice.

Parameters

nametypedefaultdescription
fileDataByte Array—The complete file contents.
rgbConverterFunc<Vector3, Vector3>—Receives red, green and blue in X, Y and Z and returns the values to store; null stores them unchanged.

Returns

resultHdr Pixel Image

Remarks

Alpha is stored as decoded and is not passed to the converter.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Load From Stream

Function

Overload 1 of 3

Signature
LoadFromStream(stream: Stream) -> Hdr Pixel Image
HdrPixelImage LoadFromStream(Stream stream)

Decodes an image from a stream into HDR values, in any format StbImageSharp's floating-point decoder accepts, such as Radiance .hdr.

Parameters

nametypedefaultdescription
streamStream—A readable stream holding the image file.

Returns

resultHdr Pixel Image

Remarks

Values returned by the decoder are stored without further conversion. The stream is read from its current position and is not closed.

Overload 2 of 3

Signature
LoadFromStream -> Hdr Pixel Image
    stream: Stream
    sourceTransfer: Color Transfer Function
    destinationTransfer: Color Transfer Function
HdrPixelImage LoadFromStream(
    Stream stream,
    ColorTransferFunction sourceTransfer,
    ColorTransferFunction destinationTransfer)

Decodes an image from a stream into HDR values, then converts the decoded red, green and blue from one transfer function to another.

Parameters

nametypedefaultdescription
streamStream—A readable stream holding the image file.
sourceTransferColor Transfer Function—The transfer function the decoded values are in.
destinationTransferColor Transfer Function—The transfer function to store them in.

Returns

resultHdr Pixel Image

Remarks

Alpha is stored as decoded. When the two transfer functions are the same, the values are left unchanged. The stream is not closed.

Overload 3 of 3

Signature
LoadFromStream -> Hdr Pixel Image
    stream: Stream
    rgbConverter: Func<Vector3, Vector3>
HdrPixelImage LoadFromStream(
    Stream stream,
    Func<Vector3, Vector3> rgbConverter)

Decodes an image from a stream into HDR values, passing each pixel's decoded red, green and blue through a conversion of your choice.

Parameters

nametypedefaultdescription
streamStream—A readable stream holding the image file.
rgbConverterFunc<Vector3, Vector3>—Receives red, green and blue in X, Y and Z and returns the values to store; null stores them unchanged.

Returns

resultHdr Pixel Image

Remarks

Alpha is stored as decoded and is not passed to the converter. The stream is read from its current position and is not closed.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Load From Text

Function

Rebuilds an image from Base64 text produced by HdrPixelImage.SaveAsText.

Signature
LoadFromText(text: Text) -> Hdr Pixel Image
HdrPixelImage LoadFromText(string text)

Parameters

nametypedefaultdescription
textText—The Base64 text.

Returns

resultHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing

Read From Stream

Function

Reads an image written by HdrPixelImage.WriteToStream, leaving the reader just past it.

Signature
ReadFromStream(reader: BinaryReader) -> (result: Large Integer, value: Hdr Pixel Image)
long ReadFromStream(
    BinaryReader reader,
    out HdrPixelImage value)

Parameters

nametypedefaultdescription
readerBinaryReader—The reader positioned at the image.

Returns

resultLarge Integer
valueHdr Pixel Image
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
HDR Pixel Image
Package
Image Processing