像素影像
61 個節點
本頁內容 61
像素影像
函數過載 1/4
像素影像() -> Pixel Image
PixelImage PixelImage()
此節點沒有文件說明。
返回
| 像素影像 | Pixel Image |
備註
We must have this empty constructor because PixelImage is deserializable as instance.
過載 2/4
像素影像(寬度: 整數, 高度: 整數) -> Pixel Image
PixelImage PixelImage(int width, int height)
Creates a blank image of the given size, with every pixel transparent black (all channels 0).
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | Number of columns, in pixels. |
| 高度 | 整數 | — | Number of rows, in pixels. |
返回
| 像素影像 | Pixel Image |
過載 3/4
像素影像 -> Pixel Image
寬度: 整數
高度: 整數
平面值: 顏色陣列PixelImage PixelImage(
int width,
int height,
ColorElement[] flat)Creates an image from a single flat run of pixels, read row by row from the top-left corner.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | Number of columns, in pixels. |
| 高度 | 整數 | — | Number of rows, in pixels. |
| 平面值 | 顏色陣列 | — | The pixels in row-major order: the first Width entries are the top row. |
返回
| 像素影像 | Pixel Image |
備註
The pixels are copied, so later changes to Flat do not affect the image. Any pixels beyond Width times Height are ignored.
過載 4/4
像素影像(像素: 顏色陣列陣列) -> Pixel Image
PixelImage PixelImage(ColorElement[][] pixels)
此節點沒有文件說明。
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 像素 | 顏色陣列陣列 | — | Direct reference without copy. |
返回
| 像素影像 | Pixel Image |
備註
A zero-row array is a legitimate empty image and yields a 0x0 one. Reading
pixels[0].Length unconditionally used to throw here, which made
PixelImage.Clone throw on any empty image — so callers that could legitimately hold one
had to route around cloning rather than the constructor simply answering zero.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
複製影像
函數Makes an independent copy of the image, so editing the copy leaves the original untouched.
複製影像(Pixel Image: Pixel Image) -> Pixel Image
PixelImage Clone(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | Pixel Image |
備註
Each row is copied up to PixelImage.Columns pixels. An empty image clones to an empty image.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
列數
函數Width of the image in pixels, that is, the number of pixels in each row.
列數(Pixel Image: Pixel Image) -> 整數
int Columns(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 整數 |
備註
Setting this does not resize PixelImage.Pixels; it only changes how much of each row the image reports and reads, so it should match the pixel data.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
像素
函數過載 1/2
像素(Pixel Image: Pixel Image, 索引: 整數) -> 顏色
ColorElement Item(PixelImage 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.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 索引 | 整數 | — | The pixel's position, from 0 to PixelImage.Columns × PixelImage.Rows - 1. |
返回
| 結果 | 顏色 |
過載 2/2
像素(Pixel Image: Pixel Image, X: 整數, Y: 整數) -> 顏色
ColorElement Item(PixelImage Pixel Image, int x, int y)
Reads or writes the pixel at a column and row, the same as PixelImage.GetPixel and PixelImage.SetPixel.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| X | 整數 | — | Column, counted from 0 at the left edge. |
| Y | 整數 | — | Row, counted from 0 at the top edge. |
返回
| 結果 | 顏色 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
像素
函數此節點沒有文件說明。
像素(Pixel Image: Pixel Image) -> 顏色陣列陣列
ColorElement[][] Pixels(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 顏色陣列陣列 |
備註
Row-major, aka. Pixels[Row][Col] or Pixels[Height][Width]
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
原始資料
函數The whole image as tightly packed RGBA bytes, four per pixel, row by row from the top-left corner; see PixelImage.ToTightlyPackedRgbaBytes.
原始資料(Pixel Image: Pixel Image) -> 位元組陣列
byte[] Raw(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | 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.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
行數
函數Height of the image in pixels, that is, the number of rows.
行數(Pixel Image: Pixel Image) -> 整數
int Rows(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 整數 |
備註
Setting this does not resize PixelImage.Pixels; it should match the number of rows in the pixel data.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
取得顏色
函數The color of one pixel, exactly as stored.
取得顏色(Pixel Image: Pixel Image, X: 整數, Y: 整數) -> 顏色
ColorElement GetColor(PixelImage Pixel Image, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| X | 整數 | — | Column, counted from 0 at the left edge. |
| Y | 整數 | — | Row, counted from 0 at the top edge. |
返回
| 結果 | 顏色 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
取得浮點值
函數The pixel's value read as a single number from 0 to 1, taken from its red channel alone; useful for heightmaps, masks and other grayscale data.
取得浮點值 -> 低精度數字
Pixel Image: Pixel Image
X: 整數
Y: 整數float GetFloatValue(PixelImage Pixel Image, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| X | 整數 | — | Column, counted from 0 at the left edge. |
| Y | 整數 | — | Row, counted from 0 at the top edge. |
返回
| 結果 | 低精度數字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
取得灰度位元組
函數The pixel's value read as grayscale, which for this image is its red channel alone (green, blue and alpha are ignored).
取得灰度位元組 -> 位元組
Pixel Image: Pixel Image
X: 整數
Y: 整數byte GetGrayByte(PixelImage Pixel Image, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| X | 整數 | — | Column, counted from 0 at the left edge. |
| Y | 整數 | — | Row, counted from 0 at the top edge. |
返回
| 結果 | 位元組 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
取得像素
函數The color of one pixel.
取得像素(Pixel Image: Pixel Image, X: 整數, Y: 整數) -> 顏色
ColorElement GetPixel(PixelImage Pixel Image, int x, int y)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| X | 整數 | — | Column, counted from 0 at the left edge. |
| Y | 整數 | — | Row, counted from 0 at the top edge. |
返回
| 結果 | 顏色 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
取得 PNG 緩衝區
函數過載 1/2
取得 PNG 緩衝區(Pixel Image: Pixel Image) -> 位元組陣列
byte[] GetPngBuffer(PixelImage Pixel Image)
Serialize image as raw PNG file buffer. Supports large images.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 位元組陣列 |
過載 2/2
取得 PNG 緩衝區 -> 位元組陣列
Pixel Image: Pixel Image
選項: Png Image Writer Optionsbyte[] GetPngBuffer(
PixelImage Pixel Image,
PngImageWriterOptions options)Serialize image as raw PNG file buffer, with explicit encoder options. Supports large images.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Png Image Writer Options | — |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存
函數過載 1/3
儲存(Pixel Image: Pixel Image, 路徑: 文字)
void Save(PixelImage Pixel Image, string path)
Writes image as PNG to target file path.
This supports large pngs.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — |
備註
Encoding is delegated to BuiltinIO.PngImageWriter, which streams row by row and picks
the smallest lossless colour type for the pixel data.
過載 2/3
儲存
Pixel Image: Pixel Image
路徑: 文字
選項: Png Image Writer Optionsvoid Save(
PixelImage Pixel Image,
string path,
PngImageWriterOptions options)Writes image as PNG to target file path, with explicit encoder options.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Png Image Writer Options | — |
過載 3/3
儲存(Pixel Image: Pixel Image, 流式輸出: Stream)
void Save(PixelImage Pixel Image, Stream stream)
Writes this image as PNG to a stream.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 BMP
函數Writes the image as a Windows bitmap (.bmp).
儲存為 BMP
Pixel Image: Pixel Image
路徑: 文字
選項: Bmp Image Writer Optionsvoid SaveAsBmp(
PixelImage Pixel Image,
string path,
BmpImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Bmp Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 GIF
函數Writes the image as GIF. Alpha collapses to the format's single transparent index.
儲存為 GIF
Pixel Image: Pixel Image
路徑: 文字
選項: Gif Image Writer Optionsvoid SaveAsGif(
PixelImage Pixel Image,
string path,
GifImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Gif Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 ICO
函數Writes the image as a Windows icon (.ico).
儲存為 ICO
Pixel Image: Pixel Image
路徑: 文字
選項: Ico Image Writer Optionsvoid SaveAsIco(
PixelImage Pixel Image,
string path,
IcoImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Ico Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 JPEG
函數Writes the image as baseline JPEG (.jpg). Lossy, and transparency is composited away.
儲存為 JPEG
Pixel Image: Pixel Image
路徑: 文字
選項: Jpeg Image Writer Optionsvoid SaveAsJpeg(
PixelImage Pixel Image,
string path,
JpegImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Jpeg Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 PNM
函數Writes the image as Netpbm (.ppm/.pgm/.pbm). Alpha is discarded.
儲存為 PNM
Pixel Image: Pixel Image
路徑: 文字
選項: Portable Any Map Image Writer Optionsvoid SaveAsPortableAnyMap(
PixelImage Pixel Image,
string path,
PortableAnyMapImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Portable Any Map Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 PFM
函數Writes the image as Portable FloatMap (.pfm), converting channels to 32-bit float.
儲存為 PFM
Pixel Image: Pixel Image
路徑: 文字
選項: Portable Float Map Image Writer Optionsvoid SaveAsPortableFloatMap(
PixelImage Pixel Image,
string path,
PortableFloatMapImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Portable Float Map Image Writer Options | — |
備註
PFM is a linear format, so by default the sRGB curve is decoded on the way in. Set
PortableFloatMapImageWriterOptions.SourceTransferFunction to
ColorTransferFunction.Linear for data that is already linear, such as a
depth buffer or heightmap - it is also considerably faster.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 QOI
函數Writes the image as Quite OK Image (.qoi) - lossless, and much faster to encode than PNG.
儲存為 QOI
Pixel Image: Pixel Image
路徑: 文字
選項: Qoi Image Writer Optionsvoid SaveAsQoi(
PixelImage Pixel Image,
string path,
QoiImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Qoi Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為文字
函數The image as Base64 text, encoding the same bytes as PixelImage.SerializeIntoBytes, for storing an image inside a text document.
儲存為文字(Pixel Image: Pixel Image) -> 文字
string SaveAsText(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 文字 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 TGA
函數Writes the image as Truevision TGA (.tga), run-length encoded by default.
儲存為 TGA
Pixel Image: Pixel Image
路徑: 文字
選項: Tga Image Writer Optionsvoid SaveAsTga(
PixelImage Pixel Image,
string path,
TgaImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Tga Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存為 WebP
函數Writes the image as WebP (.webp): lossless, with alpha stored natively, unless WebPImageWriterOptions.Lossy asks for libwebp's lossy form.
儲存為 WebP
Pixel Image: Pixel Image
路徑: 文字
選項: Web P Image Writer Optionsvoid SaveAsWebP(
PixelImage Pixel Image,
string path,
WebPImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 路徑 | 文字 | — | |
| 選項 | Web P Image Writer Options | — |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
序列化為位元組
函數Serializes the image into Divooka's own binary form, as written by PixelImage.WriteToStream.
序列化為位元組(Pixel Image: Pixel Image) -> 位元組陣列
byte[] SerializeIntoBytes(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
設定像素
函數Replaces the color of one pixel, changing the image in place.
設定像素(Pixel Image: Pixel Image, X: 整數, Y: 整數, 顏色: 顏色)
void SetPixel(
PixelImage Pixel Image,
int x,
int y,
ColorElement color)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| X | 整數 | — | Column, counted from 0 at the left edge. |
| Y | 整數 | — | Row, counted from 0 at the top edge. |
| 顏色 | 顏色 | — | The new color. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 BMP 位元組
函數Encodes the image as a Windows bitmap (.bmp) file in memory, producing the same bytes PixelImage.SaveAsBmp writes to disk.
轉為 BMP 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Bmp Image Writer Optionsbyte[] ToBmpBytes(
PixelImage Pixel Image,
BmpImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Bmp Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為平鋪陣列
函數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.
轉為平鋪陣列(Pixel Image: Pixel Image) -> 顏色陣列
ColorElement[] ToFlatArray(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 顏色陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 GIF 位元組
函數Encodes the image as a GIF file in memory, producing the same bytes PixelImage.SaveAsGif writes to disk.
轉為 GIF 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Gif Image Writer Optionsbyte[] ToGifBytes(
PixelImage Pixel Image,
GifImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Gif Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 ICO 位元組
函數Encodes the image as a Windows icon (.ico) file in memory, producing the same bytes PixelImage.SaveAsIco writes to disk.
轉為 ICO 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Ico Image Writer Optionsbyte[] ToIcoBytes(
PixelImage Pixel Image,
IcoImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Ico Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 JPEG 位元組
函數Encodes the image as a baseline JPEG (.jpg) file in memory, producing the same bytes PixelImage.SaveAsJpeg writes to disk.
轉為 JPEG 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Jpeg Image Writer Optionsbyte[] ToJpegBytes(
PixelImage Pixel Image,
JpegImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Jpeg Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 PNM 位元組
函數Encodes the image as a Netpbm (.ppm/.pgm/.pbm) file in memory, producing the same bytes PixelImage.SaveAsPortableAnyMap writes to disk.
轉為 PNM 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Portable Any Map Image Writer Optionsbyte[] ToPortableAnyMapBytes(
PixelImage Pixel Image,
PortableAnyMapImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Portable Any Map Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 PFM 位元組
函數Encodes the image as a Portable FloatMap (.pfm) file in memory, producing the same bytes PixelImage.SaveAsPortableFloatMap writes to disk.
轉為 PFM 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Portable Float Map Image Writer Optionsbyte[] ToPortableFloatMapBytes(
PixelImage Pixel Image,
PortableFloatMapImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Portable Float Map Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 QOI 位元組
函數Encodes the image as a Quite OK Image (.qoi) file in memory, producing the same bytes PixelImage.SaveAsQoi writes to disk.
轉為 QOI 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Qoi Image Writer Optionsbyte[] ToQoiBytes(
PixelImage Pixel Image,
QoiImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Qoi Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 TGA 位元組
函數Encodes the image as a Truevision TGA (.tga) file in memory, producing the same bytes PixelImage.SaveAsTga writes to disk.
轉為 TGA 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Tga Image Writer Optionsbyte[] ToTgaBytes(
PixelImage Pixel Image,
TgaImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Tga Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為緊湊 RGBA 位元組
函數Low-level interop conversion.
轉為緊湊 RGBA 位元組(Pixel Image: Pixel Image) -> 位元組陣列
byte[] ToTightlyPackedRgbaBytes(PixelImage Pixel Image)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
轉為 WebP 位元組
函數Encodes the image as a WebP (.webp) file in memory, producing the same bytes PixelImage.SaveAsWebP writes to disk.
轉為 WebP 位元組 -> 位元組陣列
Pixel Image: Pixel Image
選項: Web P Image Writer Optionsbyte[] ToWebPBytes(
PixelImage Pixel Image,
WebPImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 選項 | Web P Image Writer Options | — | Encoder settings; null uses the defaults. |
返回
| 結果 | 位元組陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
更新顏色資料
函數Replaces the image's pixel rows with whatever the updater returns, given the current rows.
更新顏色資料
Pixel Image: Pixel Image
更新函數: Func<顏色陣列陣列, 顏色陣列陣列>void UpdateColorData(
PixelImage Pixel Image,
Func<ColorElement[][], ColorElement[][]> updater)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 更新函數 | Func<顏色陣列陣列, 顏色陣列陣列> | — | A function from the current [row][column] pixel grid to the new one. |
備註
The updater receives the live pixel array, not a copy, so it may edit it in place and return it. PixelImage.Columns and PixelImage.Rows are not changed, so the returned grid should keep the same size.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 BMP
函數Encodes the image as a Windows bitmap (.bmp) file into a stream, starting at its current position; the stream is left open.
寫入 BMP
Pixel Image: Pixel Image
流式輸出: Stream
選項: Bmp Image Writer Optionsvoid WriteBmp(
PixelImage Pixel Image,
Stream stream,
BmpImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Bmp Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 GIF
函數Encodes the image as a GIF file into a stream, starting at its current position; the stream is left open.
寫入 GIF
Pixel Image: Pixel Image
流式輸出: Stream
選項: Gif Image Writer Optionsvoid WriteGif(
PixelImage Pixel Image,
Stream stream,
GifImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Gif Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 ICO
函數Encodes the image as a Windows icon (.ico) file into a stream, starting at its current position; the stream is left open.
寫入 ICO
Pixel Image: Pixel Image
流式輸出: Stream
選項: Ico Image Writer Optionsvoid WriteIco(
PixelImage Pixel Image,
Stream stream,
IcoImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Ico Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 JPEG
函數Encodes the image as a baseline JPEG (.jpg) file into a stream, starting at its current position; the stream is left open.
寫入 JPEG
Pixel Image: Pixel Image
流式輸出: Stream
選項: Jpeg Image Writer Optionsvoid WriteJpeg(
PixelImage Pixel Image,
Stream stream,
JpegImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Jpeg Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 PNM
函數Encodes the image as a Netpbm (.ppm/.pgm/.pbm) file into a stream, starting at its current position; the stream is left open.
寫入 PNM
Pixel Image: Pixel Image
流式輸出: Stream
選項: Portable Any Map Image Writer Optionsvoid WritePortableAnyMap(
PixelImage Pixel Image,
Stream stream,
PortableAnyMapImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Portable Any Map Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 PFM
函數Encodes the image as a Portable FloatMap (.pfm) file into a stream, starting at its current position; the stream is left open.
寫入 PFM
Pixel Image: Pixel Image
流式輸出: Stream
選項: Portable Float Map Image Writer Optionsvoid WritePortableFloatMap(
PixelImage Pixel Image,
Stream stream,
PortableFloatMapImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Portable Float Map Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 QOI
函數Encodes the image as a Quite OK Image (.qoi) file into a stream, starting at its current position; the stream is left open.
寫入 QOI
Pixel Image: Pixel Image
流式輸出: Stream
選項: Qoi Image Writer Optionsvoid WriteQoi(
PixelImage Pixel Image,
Stream stream,
QoiImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Qoi Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 TGA
函數Encodes the image as a Truevision TGA (.tga) file into a stream, starting at its current position; the stream is left open.
寫入 TGA
Pixel Image: Pixel Image
流式輸出: Stream
選項: Tga Image Writer Optionsvoid WriteTga(
PixelImage Pixel Image,
Stream stream,
TgaImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Tga Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入流
函數Writes the image in Divooka's binary form: four 32-bit integers (format version 1, width, height, payload length in bytes) followed by the tightly packed RGBA pixels, row by row from the top.
寫入流(Pixel Image: Pixel Image, 寫入器: BinaryWriter) -> 大整數
long WriteToStream(PixelImage Pixel Image, BinaryWriter writer)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 寫入器 | BinaryWriter | — | The writer to append to. |
返回
| 結果 | 大整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
寫入 WebP
函數Encodes the image as a WebP (.webp) file into a stream, starting at its current position; the stream is left open.
寫入 WebP
Pixel Image: Pixel Image
流式輸出: Stream
選項: Web P Image Writer Optionsvoid WriteWebP(
PixelImage Pixel Image,
Stream stream,
WebPImageWriterOptions options)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| 流式輸出 | Stream | — | A writable stream to receive the file. |
| 選項 | Web P Image Writer Options | — | Encoder settings; null uses the defaults. |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
分配像素
函數Allocates a new [row][column] pixel grid of the given size, filled with one color.
分配像素(寬度: 整數, 高度: 整數, 顏色: 可選顏色) -> 顏色陣列陣列
ColorElement[][] AllocatePixels(
int width,
int height,
ColorElement? color)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | Number of pixels in each row. |
| 高度 | 整數 | — | Number of rows. |
| 顏色 | 可選顏色 | — | The fill color; null leaves every pixel transparent black (all channels 0). |
返回
| 結果 | 顏色陣列陣列 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從平鋪陣列生成
函數Creates an image from a single array of pixels laid out row by row from the top-left corner, the inverse of PixelImage.ToFlatArray.
從平鋪陣列生成 -> Pixel Image
寬度: 整數
高度: 整數
平面值: 顏色陣列PixelImage FromFlatArray(
int width,
int height,
ColorElement[] flat)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | Number of columns, in pixels. |
| 高度 | 整數 | — | Number of rows, in pixels. |
| 平面值 | 顏色陣列 | — | Exactly Width × Height pixels; the first Width are the top row. |
返回
| 結果 | Pixel Image |
備註
The pixels are copied, so later changes to Flat do not affect the image.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從打包整數像素生成
函數Creates an image from rows of 32-bit packed pixels, one uint per pixel, indexed [row][column].
從打包整數像素生成(打包像素: 正整數陣列陣列) -> Pixel Image
PixelImage FromPackedIntPixels(uint[][] packedPixels)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 打包像素 | 正整數陣列陣列 | — | The packed pixels, row-major, every row as long as the first. |
返回
| 結果 | Pixel Image |
備註
Each value is split into bytes in the machine's byte order and read as red, green, blue, alpha, so on little-endian hardware the lowest byte is red and the highest is alpha (0xAABBGGRR). The width is taken from the first row, and the values are copied into a new pixel grid.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從打包 RGBA 位元組生成
函數過載 1/2
從打包 RGBA 位元組生成 -> Pixel Image
寬度: 整數
高度: 整數
原始位元組: 位元組陣列PixelImage FromPackedRGBABytes(
int width,
int height,
byte[] rawBytes)Creates an image from tightly packed RGBA bytes, four per pixel (red, green, blue, alpha), row by row from the top-left corner with no padding.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | Number of columns, in pixels. |
| 高度 | 整數 | — | Number of rows, in pixels. |
| 原始位元組 | 位元組陣列 | — | Exactly Width × Height × 4 bytes. |
返回
| 結果 | Pixel Image |
備註
The bytes are copied, so later changes to Raw Bytes do not affect the image. A height of 0 gives an empty image.
過載 2/2
從打包 RGBA 位元組生成 -> Pixel Image
RGBA: 位元組陣列
寬度: 整數
高度: 整數PixelImage FromPackedRGBABytes(
byte[] rgba,
int width,
int height)Legacy overload; Pending consolidation.
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| RGBA | 位元組陣列 | — | |
| 寬度 | 整數 | — | |
| 高度 | 整數 | — |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從 URI 載入
函數Loads an image from a file path or a web address, in any format PixelImage.LoadFromFile accepts.
從 URI 載入(URI: Uri) -> Pixel Image
PixelImage FromUri(Uri uri)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| URI | Uri | — | A relative path, a file URI, or an http/https URL. |
返回
| 結果 | Pixel Image |
備註
A relative URI is resolved against the current working directory and a file URI is read from disk. An http or https URI is downloaded in full, synchronously, before decoding.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
取得臨時影像路徑
函數此節點沒有文件說明。
取得臨時影像路徑() -> 文字
string GetTempImagePath()
返回
| 結果 | 文字 |
備註
Should only be used for really getting a temp image path and no longer used for conversion.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
初始化黑色影像
函數Initialize image with some color
初始化黑色影像 -> Pixel Image
寬度: 整數
高度: 整數
顏色: 可選顏色PixelImage InitializeBlackImage(
int width,
int height,
ColorElement? color)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 寬度 | 整數 | — | |
| 高度 | 整數 | — | |
| 顏色 | 可選顏色 | — |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從位元組初始化
函數Rebuilds an image from bytes produced by PixelImage.SerializeIntoBytes.
從位元組初始化(資料: 位元組陣列) -> Pixel Image
PixelImage InitializeFromBytes(byte[] data)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 資料 | 位元組陣列 | — | The serialized image. |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從檔案載入
函數Load from PNG file.
In reality, supports wider range of input options than PixelImage.LoadFromFile.
從檔案載入(路徑: 文字) -> Pixel Image
PixelImage LoadFromFile(string path)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 路徑 | 文字 | — |
返回
| 結果 | Pixel Image |
備註
Though officially we support only PNG file on Image.PixelImage; In practice this can load more than that.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從檔案緩衝區載入
函數此節點沒有文件說明。
從檔案緩衝區載入(檔案資料: 位元組陣列) -> Pixel Image
PixelImage LoadFromFileBuffer(byte[] fileData)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 檔案資料 | 位元組陣列 | — | Png, jpg, bmp, webp... Anything you like! |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從文字載入
函數Rebuilds an image from Base64 text produced by PixelImage.SaveAsText.
從文字載入(文字: 文字) -> Pixel Image
PixelImage LoadFromText(string text)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 文字 | 文字 | — | The Base64 text. |
返回
| 結果 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從檔案緩衝區載入打包 RGBA
函數Decodes an image straight to tightly packed RGBA bytes, row zero first, without building
a Image.PixelImage on the way.
從檔案緩衝區載入打包 RGBA(檔案資料: 位元組陣列) -> (結果: 位元組陣列, 寬度: 整數, 高度: 整數)
byte[] LoadPackedRgbaFromFileBuffer(
byte[] fileData,
out int width,
out int height)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 檔案資料 | 位元組陣列 | — | Png, jpg, bmp, webp... Anything PixelImage.LoadFromFileBuffer takes. |
返回
| 結果 | 位元組陣列 |
| 寬度 | 整數 |
| 高度 | 整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
從流讀取
函數Reads an image written by PixelImage.WriteToStream, leaving the reader just past it.
從流讀取(讀取器: BinaryReader) -> (結果: 大整數, 值: Pixel Image)
long ReadFromStream(BinaryReader reader, out PixelImage value)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 讀取器 | BinaryReader | — | The reader positioned at the image. |
返回
| 結果 | 大整數 |
| 值 | Pixel Image |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理
儲存原始資料
函數Compact fast raw data dump that writes a tiny header (magic + version + width + height) followed by tightly packed RGBA bytes for every pixel in row-major order.
儲存原始資料
路徑: 文字
像素: 顏色陣列陣列
寬度: 整數
高度: 整數void SaveRaw(
string path,
ColorElement[][] pixels,
int width,
int height)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 路徑 | 文字 | — | |
| 像素 | 顏色陣列陣列 | — | |
| 寬度 | 整數 | — | |
| 高度 | 整數 | — |
備註
It uses MemoryMarshal.AsBytes so we avoid per-pixel copying.
### Format summary
**Header (9 bytes total):**
* `PXLR` (ASCII)
* `1` (byte: format version)
* `width` (Int32, little-endian)
* `height` (Int32, little-endian)
**Data:** `height` rows × `width` pixels × **4 bytes per pixel** (R, G, B, A), no padding.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 像素影像
- 所屬包
- 影像處理