元編程參考文件

HDR 像素影像

46 個節點

本頁內容 46

HDR 像素影像

函數

過載 1/7

簽名
HDR 像素影像() -> Hdr Pixel Image
HdrPixelImage HdrPixelImage()

此節點沒有文件說明。

返回

HDR 像素影像Hdr Pixel Image

備註

Required for serialization and empty values.

過載 2/7

簽名
HDR 像素影像(寬度: 整數, 高度: 整數) -> Hdr Pixel Image
HdrPixelImage HdrPixelImage(int width, int height)

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

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.

返回

HDR 像素影像Hdr Pixel Image

過載 3/7

簽名
HDR 像素影像 -> Hdr Pixel Image
    寬度: 整數
    高度: 整數
    值: 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.

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.
值Hdr Color Element—The color every pixel starts with.

返回

HDR 像素影像Hdr Pixel Image

過載 4/7

簽名
HDR 像素影像(像素: Hdr Color Element 陣列陣列) -> Hdr Pixel Image
HdrPixelImage HdrPixelImage(HdrColorElement[][] pixels)

此節點沒有文件說明。

參數

名稱型別預設值說明
像素Hdr Color Element 陣列陣列—Direct reference without copy.

返回

HDR 像素影像Hdr Pixel Image

過載 5/7

簽名
HDR 像素影像 -> Hdr Pixel Image
    寬度: 整數
    高度: 整數
    平面值: Hdr Color Element 陣列
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.

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.
平面值Hdr Color Element 陣列—Exactly Width × Height pixels; the first Width are the top row.

返回

HDR 像素影像Hdr Pixel Image

備註

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

過載 6/7

簽名
HDR 像素影像 -> Hdr Pixel Image
    影像: Pixel Image
    選項: Pixel To Hdr Image Options
HdrPixelImage HdrPixelImage(
    PixelImage image,
    PixelToHdrImageOptions options)

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

參數

名稱型別預設值說明
影像Pixel Image—
選項Pixel To Hdr Image Options—

返回

HDR 像素影像Hdr Pixel Image

過載 7/7

簽名
HDR 像素影像 -> Hdr Pixel Image
    影像: Pixel Image
    RGB 轉換器: Func<Vector3, Vector3>
HdrPixelImage HdrPixelImage(
    PixelImage image,
    Func<Vector3, Vector3> rgbConverter)

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

參數

名稱型別預設值說明
影像Pixel Image—
RGB 轉換器Func<Vector3, Vector3>—

返回

HDR 像素影像Hdr Pixel Image

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

複製影像

函數

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

簽名
複製影像(HDR Pixel Image: Hdr Pixel Image) -> Hdr Pixel Image
HdrPixelImage Clone(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

列數

函數

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

簽名
列數(HDR Pixel Image: Hdr Pixel Image) -> 整數
int Columns(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

像素

函數

過載 1/2

簽名
像素 -> Hdr Color Element
    HDR Pixel Image: Hdr Pixel Image
    索引: 整數
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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
索引整數—The pixel's position, from 0 to HdrPixelImage.Columns × HdrPixelImage.Rows - 1.

返回

結果Hdr Color Element

過載 2/2

簽名
像素 -> Hdr Color Element
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—Column, counted from 0 at the left edge.
Y整數—Row, counted from 0 at the top edge.

返回

結果Hdr Color Element
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

像素

函數

此節點沒有文件說明。

簽名
像素(HDR Pixel Image: Hdr Pixel Image) -> Hdr Color Element 陣列陣列
HdrColorElement[][] Pixels(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果Hdr Color Element 陣列陣列

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

原始資料

函數

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.

簽名
原始資料(HDR Pixel Image: Hdr Pixel Image) -> 位元組陣列
byte[] Raw(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果位元組陣列

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

行數

函數

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

簽名
行數(HDR Pixel Image: Hdr Pixel Image) -> 整數
int Rows(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

取得顏色

函數

Returns the fixed default tone-mapped preview color.

簽名
取得顏色 -> 顏色
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
ColorElement GetColor(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—
Y整數—

返回

結果顏色
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

取得浮點值

函數

Returns fixed-default tone-mapped linear luminance.

簽名
取得浮點值 -> 低精度數字
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
float GetFloatValue(HdrPixelImage Hdr Pixel Image, int x, int y)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—
Y整數—

返回

結果低精度數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

取得灰度位元組

函數

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

簽名
取得灰度位元組 -> 位元組
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
byte GetGrayByte(HdrPixelImage Hdr Pixel Image, int x, int y)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—
Y整數—

返回

結果位元組
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

取得 HDR 顏色

函數

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

簽名
取得 HDR 顏色 -> Hdr Color Element
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
HdrColorElement GetHdrColor(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—Column, counted from 0 at the left edge.
Y整數—Row, counted from 0 at the top edge.

返回

結果Hdr Color Element
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

取得 HDR 亮度

函數

Returns luminance directly from stored RGB values without transfer conversion.

簽名
取得 HDR 亮度 -> 低精度數字
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
float GetHdrLuminance(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—
Y整數—

返回

結果低精度數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

取得摘要

函數

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.

簽名
取得摘要(HDR Pixel Image: Hdr Pixel Image) -> 文字
string GetSummary(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果文字

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

直方圖

函數

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.

簽名
直方圖(HDR Pixel Image: Hdr Pixel Image, 柱數: 整數) -> 數字陣列
double[] Histogram(HdrPixelImage Hdr Pixel Image, int bars)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
柱數整數—

返回

結果數字陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

是否在顯示範圍內

函數

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.

簽名
是否在顯示範圍內 -> 真否
    HDR Pixel Image: Hdr Pixel Image
    曝光倍數: 低精度數字
bool IsWithinDisplayRange(
    HdrPixelImage Hdr Pixel Image,
    float exposureMultiplier = 1f)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
曝光倍數低精度數字1The linear exposure factor the conversion will apply.

返回

結果真否

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

最大值

函數

此節點沒有文件說明。

簽名
最大值(HDR Pixel Image: Hdr Pixel Image, 聲道: 整數) -> 數字
double Max(HdrPixelImage Hdr Pixel Image, int channel)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
聲道整數—0-3

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

最小值

函數

此節點沒有文件說明。

簽名
最小值(HDR Pixel Image: Hdr Pixel Image, 聲道: 整數) -> 數字
double Min(HdrPixelImage Hdr Pixel Image, int channel)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
聲道整數—0-3

返回

結果數字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

儲存為 PFM

函數

Writes the image as Portable FloatMap (.pfm).

簽名
儲存為 PFM
    HDR Pixel Image: Hdr Pixel Image
    路徑: 文字
    選項: Portable Float Map Image Writer Options
void SaveAsPortableFloatMap(
    HdrPixelImage Hdr Pixel Image,
    string path,
    PortableFloatMapImageWriterOptions options)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
路徑文字—
選項Portable Float Map Image Writer Options—

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

儲存為 Radiance HDR

函數

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

簽名
儲存為 Radiance HDR
    HDR Pixel Image: Hdr Pixel Image
    路徑: 文字
    選項: Radiance Hdr Image Writer Options
void SaveAsRadianceHdr(
    HdrPixelImage Hdr Pixel Image,
    string path,
    RadianceHdrImageWriterOptions options)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
路徑文字—The file to create or overwrite.
選項Radiance Hdr Image Writer Options—Encoder settings; null uses the defaults.

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

儲存為文字

函數

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

簽名
儲存為文字(HDR Pixel Image: Hdr Pixel Image) -> 文字
string SaveAsText(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果文字
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

序列化為位元組

函數

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

簽名
序列化為位元組(HDR Pixel Image: Hdr Pixel Image) -> 位元組陣列
byte[] SerializeIntoBytes(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果位元組陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

設定 HDR 顏色

函數

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

簽名
設定 HDR 顏色
    HDR Pixel Image: Hdr Pixel Image
    X: 整數
    Y: 整數
    顏色: Hdr Color Element
void SetHdrColor(
    HdrPixelImage Hdr Pixel Image,
    int x,
    int y,
    HdrColorElement color)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
X整數—Column, counted from 0 at the left edge.
Y整數—Row, counted from 0 at the top edge.
顏色Hdr Color Element—The new color, stored exactly as given.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

轉為平鋪陣列

函數

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.

簽名
轉為平鋪陣列(HDR Pixel Image: Hdr Pixel Image) -> Hdr Color Element 陣列
HdrColorElement[] ToFlatArray(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果Hdr Color Element 陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

轉為像素影像

函數

過載 1/3

簽名
轉為像素影像(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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果Pixel Image

備註

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.

過載 2/3

簽名
轉為像素影像 -> Pixel Image
    HDR Pixel Image: Hdr Pixel Image
    選項: 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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
選項Hdr To Pixel Image Options—The conversion settings; null uses HdrToPixelImageOptions.Default (ACES tone mapping, linear to sRGB, no exposure change).

返回

結果Pixel Image

備註

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.

過載 3/3

簽名
轉為像素影像 -> Pixel Image
    HDR Pixel Image: Hdr Pixel Image
    傳遞函數: Func<Vector3, 顏色>
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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
傳遞函數Func<Vector3, 顏色>—Turns one pixel's stored red, green and blue into the 8-bit color to write.

返回

結果Pixel Image

備註

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.

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

轉為 PFM 位元組

函數

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

簽名
轉為 PFM 位元組 -> 位元組陣列
    HDR Pixel Image: Hdr Pixel Image
    選項: Portable Float Map Image Writer Options
byte[] ToPortableFloatMapBytes(
    HdrPixelImage Hdr Pixel Image,
    PortableFloatMapImageWriterOptions options)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
選項Portable Float Map Image Writer Options—Encoder settings; null uses the defaults.

返回

結果位元組陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

轉為 Radiance HDR 位元組

函數

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

簽名
轉為 Radiance HDR 位元組 -> 位元組陣列
    HDR Pixel Image: Hdr Pixel Image
    選項: Radiance Hdr Image Writer Options
byte[] ToRadianceHdrBytes(
    HdrPixelImage Hdr Pixel Image,
    RadianceHdrImageWriterOptions options)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
選項Radiance Hdr Image Writer Options—Encoder settings; null uses the defaults.

返回

結果位元組陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

轉為緊湊小端 32 位浮點位元組

函數

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.

簽名
轉為緊湊小端 32 位浮點位元組(HDR Pixel Image: Hdr Pixel Image) -> 位元組陣列
byte[] ToTightlyPackedFloat32LittleEndianBytes(HdrPixelImage Hdr Pixel Image)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—

返回

結果位元組陣列

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

變換 HDR 資料

函數

過載 1/2

簽名
變換 HDR 資料
    HDR Pixel Image: Hdr Pixel Image
    變換函數: 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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
變換函數Func<Hdr Color Element, Hdr Color Element>—

過載 2/2

簽名
變換 HDR 資料
    HDR Pixel Image: Hdr Pixel Image
    變換函數: Func<整數, 整數, 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.

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
變換函數Func<整數, 整數, Hdr Color Element, Hdr Color Element>—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

更新顏色資料

函數

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

簽名
更新顏色資料
    HDR Pixel Image: Hdr Pixel Image
    更新函數: Func<顏色陣列陣列, 顏色陣列陣列>
void UpdateColorData(
    HdrPixelImage Hdr Pixel Image,
    Func<ColorElement[][], ColorElement[][]> updater)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
更新函數Func<顏色陣列陣列, 顏色陣列陣列>—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

更新 HDR 資料

函數

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

簽名
更新 HDR 資料
    HDR Pixel Image: Hdr Pixel Image
    更新函數: Func<Hdr Color Element 陣列陣列, Hdr Color Element 陣列陣列>
void UpdateHdrData(
    HdrPixelImage Hdr Pixel Image,
    Func<HdrColorElement[][], HdrColorElement[][]> updater)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
更新函數Func<Hdr Color Element 陣列陣列, Hdr Color Element 陣列陣列>—
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

寫入 PFM

函數

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

簽名
寫入 PFM
    HDR Pixel Image: Hdr Pixel Image
    流式輸出: Stream
    選項: Portable Float Map Image Writer Options
void WritePortableFloatMap(
    HdrPixelImage Hdr Pixel Image,
    Stream stream,
    PortableFloatMapImageWriterOptions options)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
流式輸出Stream—A writable stream to receive the file.
選項Portable Float Map Image Writer Options—Encoder settings; null uses the defaults.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

寫入 Radiance HDR

函數

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

簽名
寫入 Radiance HDR
    HDR Pixel Image: Hdr Pixel Image
    流式輸出: Stream
    選項: Radiance Hdr Image Writer Options
void WriteRadianceHdr(
    HdrPixelImage Hdr Pixel Image,
    Stream stream,
    RadianceHdrImageWriterOptions options)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
流式輸出Stream—A writable stream to receive the file.
選項Radiance Hdr Image Writer Options—Encoder settings; null uses the defaults.
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

寫入緊湊小端 32 位浮點資料

函數

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

簽名
寫入緊湊小端 32 位浮點資料 -> 大整數
    HDR Pixel Image: Hdr Pixel Image
    流式輸出: Stream
long WriteTightlyPackedFloat32LittleEndian(
    HdrPixelImage Hdr Pixel Image,
    Stream stream)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
流式輸出Stream—

返回

結果大整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

寫入流

函數

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

簽名
寫入流 -> 大整數
    HDR Pixel Image: Hdr Pixel Image
    寫入器: BinaryWriter
long WriteToStream(
    HdrPixelImage Hdr Pixel Image,
    BinaryWriter writer)

參數

名稱型別預設值說明
HDR Pixel ImageHdr Pixel Image—
寫入器BinaryWriter—

返回

結果大整數
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

分配像素

函數

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

簽名
分配像素 -> Hdr Color Element 陣列陣列
    寬度: 整數
    高度: 整數
    值: 可選 Hdr Color Element
HdrColorElement[][] AllocatePixels(
    int width,
    int height,
    HdrColorElement? value)

參數

名稱型別預設值說明
寬度整數—Number of pixels in each row.
高度整數—Number of rows.
值可選 Hdr Color Element—The fill color; null leaves every pixel transparent black (all channels 0).

返回

結果Hdr Color Element 陣列陣列
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從平鋪陣列生成

函數

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.

簽名
從平鋪陣列生成 -> Hdr Pixel Image
    寬度: 整數
    高度: 整數
    平面值: Hdr Color Element 陣列
HdrPixelImage FromFlatArray(
    int width,
    int height,
    HdrColorElement[] flat)

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.
平面值Hdr Color Element 陣列—Exactly Width × Height pixels; the first Width are the top row.

返回

結果Hdr Pixel Image

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從像素影像生成

函數

過載 1/2

簽名
從像素影像生成 -> Hdr Pixel Image
    影像: Pixel Image
    選項: 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.

參數

名稱型別預設值說明
影像Pixel Image—The 8-bit image to convert.
選項Pixel To Hdr Image Options—The source and destination transfer functions; null uses PixelToHdrImageOptions.Default (sRGB to linear).

返回

結果Hdr Pixel Image

備註

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

過載 2/2

簽名
從像素影像生成 -> Hdr Pixel Image
    影像: Pixel Image
    RGB 轉換器: Func<Vector3, Vector3>
HdrPixelImage FromPixelImage(
    PixelImage image,
    Func<Vector3, Vector3> rgbConverter)

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

參數

名稱型別預設值說明
影像Pixel Image—
RGB 轉換器Func<Vector3, Vector3>—

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從緊湊小端 32 位浮點位元組生成

函數

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.

簽名
從緊湊小端 32 位浮點位元組生成 -> Hdr Pixel Image
    寬度: 整數
    高度: 整數
    原始位元組: 位元組陣列
HdrPixelImage FromTightlyPackedFloat32LittleEndianBytes(
    int width,
    int height,
    byte[] rawBytes)

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.
原始位元組位元組陣列—Exactly Width × Height × 16 bytes.

返回

結果Hdr Pixel Image

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

初始化黑色影像

函數

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

簽名
初始化黑色影像(寬度: 整數, 高度: 整數) -> Hdr Pixel Image
HdrPixelImage InitializeBlackImage(int width, int height)

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從位元組初始化

函數

Rebuilds an image from bytes produced by HdrPixelImage.SerializeIntoBytes.

簽名
從位元組初始化(資料: 位元組陣列) -> Hdr Pixel Image
HdrPixelImage InitializeFromBytes(byte[] data)

參數

名稱型別預設值說明
資料位元組陣列—The serialized image, with nothing after it.

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

初始化影像

函數

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

簽名
初始化影像 -> Hdr Pixel Image
    寬度: 整數
    高度: 整數
    值: Hdr Color Element
HdrPixelImage InitializeImage(
    int width,
    int height,
    HdrColorElement value)

參數

名稱型別預設值說明
寬度整數—Number of columns, in pixels.
高度整數—Number of rows, in pixels.
值Hdr Color Element—The color every pixel starts with.

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從檔案載入

函數

過載 1/3

簽名
從檔案載入(路徑: 文字) -> Hdr Pixel Image
HdrPixelImage LoadFromFile(string path)

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

參數

名稱型別預設值說明
路徑文字—

返回

結果Hdr Pixel Image

備註

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

過載 2/3

簽名
從檔案載入 -> Hdr Pixel Image
    路徑: 文字
    源傳遞函數: Color Transfer Function
    目標傳遞函數: 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.

參數

名稱型別預設值說明
路徑文字—
源傳遞函數Color Transfer Function—
目標傳遞函數Color Transfer Function—

返回

結果Hdr Pixel Image

過載 3/3

簽名
從檔案載入 -> Hdr Pixel Image
    路徑: 文字
    RGB 轉換器: Func<Vector3, Vector3>
HdrPixelImage LoadFromFile(
    string path,
    Func<Vector3, Vector3> rgbConverter)

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

參數

名稱型別預設值說明
路徑文字—
RGB 轉換器Func<Vector3, Vector3>—

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從檔案緩衝區載入

函數

過載 1/3

簽名
從檔案緩衝區載入(檔案資料: 位元組陣列) -> 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.

參數

名稱型別預設值說明
檔案資料位元組陣列—The complete file contents.

返回

結果Hdr Pixel Image

備註

Values returned by the decoder are stored without further conversion.

過載 2/3

簽名
從檔案緩衝區載入 -> Hdr Pixel Image
    檔案資料: 位元組陣列
    源傳遞函數: Color Transfer Function
    目標傳遞函數: 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.

參數

名稱型別預設值說明
檔案資料位元組陣列—The complete file contents.
源傳遞函數Color Transfer Function—The transfer function the decoded values are in.
目標傳遞函數Color Transfer Function—The transfer function to store them in.

返回

結果Hdr Pixel Image

備註

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

過載 3/3

簽名
從檔案緩衝區載入 -> Hdr Pixel Image
    檔案資料: 位元組陣列
    RGB 轉換器: 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.

參數

名稱型別預設值說明
檔案資料位元組陣列—The complete file contents.
RGB 轉換器Func<Vector3, Vector3>—Receives red, green and blue in X, Y and Z and returns the values to store; null stores them unchanged.

返回

結果Hdr Pixel Image

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從流載入

函數

過載 1/3

簽名
從流載入(流式輸出: 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.

參數

名稱型別預設值說明
流式輸出Stream—A readable stream holding the image file.

返回

結果Hdr Pixel Image

備註

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

過載 2/3

簽名
從流載入 -> Hdr Pixel Image
    流式輸出: Stream
    源傳遞函數: Color Transfer Function
    目標傳遞函數: 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.

參數

名稱型別預設值說明
流式輸出Stream—A readable stream holding the image file.
源傳遞函數Color Transfer Function—The transfer function the decoded values are in.
目標傳遞函數Color Transfer Function—The transfer function to store them in.

返回

結果Hdr Pixel Image

備註

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

過載 3/3

簽名
從流載入 -> Hdr Pixel Image
    流式輸出: Stream
    RGB 轉換器: 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.

參數

名稱型別預設值說明
流式輸出Stream—A readable stream holding the image file.
RGB 轉換器Func<Vector3, Vector3>—Receives red, green and blue in X, Y and Z and returns the values to store; null stores them unchanged.

返回

結果Hdr Pixel Image

備註

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

所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從文字載入

函數

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

簽名
從文字載入(文字: 文字) -> Hdr Pixel Image
HdrPixelImage LoadFromText(string text)

參數

名稱型別預設值說明
文字文字—The Base64 text.

返回

結果Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理

從流讀取

函數

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

簽名
從流讀取(讀取器: BinaryReader) -> (結果: 大整數, 值: Hdr Pixel Image)
long ReadFromStream(
    BinaryReader reader,
    out HdrPixelImage value)

參數

名稱型別預設值說明
讀取器BinaryReader—The reader positioned at the image.

返回

結果大整數
值Hdr Pixel Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
HDR 像素影像
所屬包
影像處理