像素图像
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.
- 所属发行版
- 元编程(教育版)元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 像素图像
- 所属包
- 图像处理