Pixel Image
61 nodes
On this page 61
Make Pixel Image
FunctionOverload 1 of 4
PixelImage() -> Pixel Image
PixelImage PixelImage()
This node carries no documentation.
Returns
| result | Pixel Image |
Remarks
We must have this empty constructor because PixelImage is deserializable as instance.
Overload 2 of 4
PixelImage(width: Integer, height: Integer) -> Pixel Image
PixelImage PixelImage(int width, int height)
Creates a blank image of the given size, with every pixel transparent black (all channels 0).
Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | Number of columns, in pixels. |
| height | Integer | — | Number of rows, in pixels. |
Returns
| result | Pixel Image |
Overload 3 of 4
PixelImage -> Pixel Image
width: Integer
height: Integer
flat: Color ArrayPixelImage 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.
Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | Number of columns, in pixels. |
| height | Integer | — | Number of rows, in pixels. |
| flat | Color Array | — | The pixels in row-major order: the first Width entries are the top row. |
Returns
| result | Pixel Image |
Remarks
The pixels are copied, so later changes to Flat do not affect the image. Any pixels beyond Width times Height are ignored.
Overload 4 of 4
PixelImage(pixels: Color Array Array) -> Pixel Image
PixelImage PixelImage(ColorElement[][] pixels)
This node carries no documentation.
Parameters
| name | type | default | description |
|---|---|---|---|
| pixels | Color Array Array | — | Direct reference without copy. |
Returns
| result | Pixel Image |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Clone
FunctionMakes an independent copy of the image, so editing the copy leaves the original untouched.
Clone(Pixel Image: Pixel Image) -> Pixel Image
PixelImage Clone(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Pixel Image |
Remarks
Each row is copied up to PixelImage.Columns pixels. An empty image clones to an empty image.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Columns
FunctionWidth of the image in pixels, that is, the number of pixels in each row.
Columns(Pixel Image: Pixel Image) -> Integer
int Columns(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Integer |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Item
FunctionOverload 1 of 2
Item(Pixel Image: Pixel Image, index: Integer) -> Color
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.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| index | Integer | — | The pixel's position, from 0 to PixelImage.Columns × PixelImage.Rows - 1. |
Returns
| result | Color |
Overload 2 of 2
Item(Pixel Image: Pixel Image, x: Integer, y: Integer) -> Color
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.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| x | Integer | — | Column, counted from 0 at the left edge. |
| y | Integer | — | Row, counted from 0 at the top edge. |
Returns
| result | Color |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Pixels
FunctionThis node carries no documentation.
Pixels(Pixel Image: Pixel Image) -> Color Array Array
ColorElement[][] Pixels(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Color Array Array |
Remarks
Row-major, aka. Pixels[Row][Col] or Pixels[Height][Width]
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Raw
FunctionThe whole image as tightly packed RGBA bytes, four per pixel, row by row from the top-left corner; see PixelImage.ToTightlyPackedRgbaBytes.
Raw(Pixel Image: Pixel Image) -> Byte Array
byte[] Raw(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Byte Array |
Remarks
Every read builds a new copy of the pixel data, so read it once and keep the result rather than reading it inside a loop.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Rows
FunctionHeight of the image in pixels, that is, the number of rows.
Rows(Pixel Image: Pixel Image) -> Integer
int Rows(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Integer |
Remarks
Setting this does not resize PixelImage.Pixels; it should match the number of rows in the pixel data.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Get Color
FunctionThe color of one pixel, exactly as stored.
GetColor -> Color
Pixel Image: Pixel Image
x: Integer
y: IntegerColorElement GetColor(PixelImage Pixel Image, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| x | Integer | — | Column, counted from 0 at the left edge. |
| y | Integer | — | Row, counted from 0 at the top edge. |
Returns
| result | Color |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Get Float Value
FunctionThe 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.
GetFloatValue -> Low Accuracy Number
Pixel Image: Pixel Image
x: Integer
y: Integerfloat GetFloatValue(PixelImage Pixel Image, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| x | Integer | — | Column, counted from 0 at the left edge. |
| y | Integer | — | Row, counted from 0 at the top edge. |
Returns
| result | Low Accuracy Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Get Gray Byte
FunctionThe pixel's value read as grayscale, which for this image is its red channel alone (green, blue and alpha are ignored).
GetGrayByte -> Byte
Pixel Image: Pixel Image
x: Integer
y: Integerbyte GetGrayByte(PixelImage Pixel Image, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| x | Integer | — | Column, counted from 0 at the left edge. |
| y | Integer | — | Row, counted from 0 at the top edge. |
Returns
| result | Byte |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Get Pixel
FunctionThe color of one pixel.
GetPixel -> Color
Pixel Image: Pixel Image
x: Integer
y: IntegerColorElement GetPixel(PixelImage Pixel Image, int x, int y)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| x | Integer | — | Column, counted from 0 at the left edge. |
| y | Integer | — | Row, counted from 0 at the top edge. |
Returns
| result | Color |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Get Png Buffer
FunctionOverload 1 of 2
GetPngBuffer(Pixel Image: Pixel Image) -> Byte Array
byte[] GetPngBuffer(PixelImage Pixel Image)
Serialize image as raw PNG file buffer. Supports large images.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Byte Array |
Overload 2 of 2
GetPngBuffer -> Byte Array
Pixel Image: Pixel Image
options: Png Image Writer Optionsbyte[] GetPngBuffer(
PixelImage Pixel Image,
PngImageWriterOptions options)Serialize image as raw PNG file buffer, with explicit encoder options. Supports large images.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Png Image Writer Options | — |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save
FunctionOverload 1 of 3
Save(Pixel Image: Pixel Image, path: Text)
void Save(PixelImage Pixel Image, string path)
Writes image as PNG to target file path.
This supports large pngs.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — |
Remarks
Encoding is delegated to BuiltinIO.PngImageWriter, which streams row by row and picks
the smallest lossless colour type for the pixel data.
Overload 2 of 3
Save
Pixel Image: Pixel Image
path: Text
options: Png Image Writer Optionsvoid Save(
PixelImage Pixel Image,
string path,
PngImageWriterOptions options)Writes image as PNG to target file path, with explicit encoder options.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Png Image Writer Options | — |
Overload 3 of 3
Save(Pixel Image: Pixel Image, stream: Stream)
void Save(PixelImage Pixel Image, Stream stream)
Writes this image as PNG to a stream.
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Bmp
FunctionWrites the image as a Windows bitmap (.bmp).
SaveAsBmp
Pixel Image: Pixel Image
path: Text
options: Bmp Image Writer Optionsvoid SaveAsBmp(
PixelImage Pixel Image,
string path,
BmpImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Bmp Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Gif
FunctionWrites the image as GIF. Alpha collapses to the format's single transparent index.
SaveAsGif
Pixel Image: Pixel Image
path: Text
options: Gif Image Writer Optionsvoid SaveAsGif(
PixelImage Pixel Image,
string path,
GifImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Gif Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Ico
FunctionWrites the image as a Windows icon (.ico).
SaveAsIco
Pixel Image: Pixel Image
path: Text
options: Ico Image Writer Optionsvoid SaveAsIco(
PixelImage Pixel Image,
string path,
IcoImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Ico Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Jpeg
FunctionWrites the image as baseline JPEG (.jpg). Lossy, and transparency is composited away.
SaveAsJpeg
Pixel Image: Pixel Image
path: Text
options: Jpeg Image Writer Optionsvoid SaveAsJpeg(
PixelImage Pixel Image,
string path,
JpegImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Jpeg Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Portable Any Map
FunctionWrites the image as Netpbm (.ppm/.pgm/.pbm). Alpha is discarded.
SaveAsPortableAnyMap
Pixel Image: Pixel Image
path: Text
options: Portable Any Map Image Writer Optionsvoid SaveAsPortableAnyMap(
PixelImage Pixel Image,
string path,
PortableAnyMapImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Portable Any Map Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Portable Float Map
FunctionWrites the image as Portable FloatMap (.pfm), converting channels to 32-bit float.
SaveAsPortableFloatMap
Pixel Image: Pixel Image
path: Text
options: Portable Float Map Image Writer Optionsvoid SaveAsPortableFloatMap(
PixelImage Pixel Image,
string path,
PortableFloatMapImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Portable Float Map Image Writer Options | — |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Qoi
FunctionWrites the image as Quite OK Image (.qoi) - lossless, and much faster to encode than PNG.
SaveAsQoi
Pixel Image: Pixel Image
path: Text
options: Qoi Image Writer Optionsvoid SaveAsQoi(
PixelImage Pixel Image,
string path,
QoiImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Qoi Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Text
FunctionThe image as Base64 text, encoding the same bytes as PixelImage.SerializeIntoBytes, for storing an image inside a text document.
SaveAsText(Pixel Image: Pixel Image) -> Text
string SaveAsText(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Tga
FunctionWrites the image as Truevision TGA (.tga), run-length encoded by default.
SaveAsTga
Pixel Image: Pixel Image
path: Text
options: Tga Image Writer Optionsvoid SaveAsTga(
PixelImage Pixel Image,
string path,
TgaImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Tga Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save As Web P
FunctionWrites the image as WebP (.webp): lossless, with alpha stored natively, unless WebPImageWriterOptions.Lossy asks for libwebp's lossy form.
SaveAsWebP
Pixel Image: Pixel Image
path: Text
options: Web P Image Writer Optionsvoid SaveAsWebP(
PixelImage Pixel Image,
string path,
WebPImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| path | Text | — | |
| options | Web P Image Writer Options | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Serialize Into Bytes
FunctionSerializes the image into Divooka's own binary form, as written by PixelImage.WriteToStream.
SerializeIntoBytes(Pixel Image: Pixel Image) -> Byte Array
byte[] SerializeIntoBytes(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Set Pixel
FunctionReplaces the color of one pixel, changing the image in place.
SetPixel
Pixel Image: Pixel Image
x: Integer
y: Integer
color: Colorvoid SetPixel(
PixelImage Pixel Image,
int x,
int y,
ColorElement color)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| x | Integer | — | Column, counted from 0 at the left edge. |
| y | Integer | — | Row, counted from 0 at the top edge. |
| color | Color | — | The new color. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Bmp Bytes
FunctionEncodes the image as a Windows bitmap (.bmp) file in memory, producing the same bytes PixelImage.SaveAsBmp writes to disk.
ToBmpBytes -> Byte Array
Pixel Image: Pixel Image
options: Bmp Image Writer Optionsbyte[] ToBmpBytes(
PixelImage Pixel Image,
BmpImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Bmp Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Flat Array
FunctionCopies all pixels into a single array, row by row from the top-left corner, so pixel (x, y) is at index y * Columns + x.
ToFlatArray(Pixel Image: Pixel Image) -> Color Array
ColorElement[] ToFlatArray(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Color Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Gif Bytes
FunctionEncodes the image as a GIF file in memory, producing the same bytes PixelImage.SaveAsGif writes to disk.
ToGifBytes -> Byte Array
Pixel Image: Pixel Image
options: Gif Image Writer Optionsbyte[] ToGifBytes(
PixelImage Pixel Image,
GifImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Gif Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Ico Bytes
FunctionEncodes the image as a Windows icon (.ico) file in memory, producing the same bytes PixelImage.SaveAsIco writes to disk.
ToIcoBytes -> Byte Array
Pixel Image: Pixel Image
options: Ico Image Writer Optionsbyte[] ToIcoBytes(
PixelImage Pixel Image,
IcoImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Ico Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Jpeg Bytes
FunctionEncodes the image as a baseline JPEG (.jpg) file in memory, producing the same bytes PixelImage.SaveAsJpeg writes to disk.
ToJpegBytes -> Byte Array
Pixel Image: Pixel Image
options: Jpeg Image Writer Optionsbyte[] ToJpegBytes(
PixelImage Pixel Image,
JpegImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Jpeg Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Portable Any Map Bytes
FunctionEncodes the image as a Netpbm (.ppm/.pgm/.pbm) file in memory, producing the same bytes PixelImage.SaveAsPortableAnyMap writes to disk.
ToPortableAnyMapBytes -> Byte Array
Pixel Image: Pixel Image
options: Portable Any Map Image Writer Optionsbyte[] ToPortableAnyMapBytes(
PixelImage Pixel Image,
PortableAnyMapImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Portable Any Map Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Portable Float Map Bytes
FunctionEncodes the image as a Portable FloatMap (.pfm) file in memory, producing the same bytes PixelImage.SaveAsPortableFloatMap writes to disk.
ToPortableFloatMapBytes -> Byte Array
Pixel Image: Pixel Image
options: Portable Float Map Image Writer Optionsbyte[] ToPortableFloatMapBytes(
PixelImage Pixel Image,
PortableFloatMapImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Portable Float Map Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Qoi Bytes
FunctionEncodes the image as a Quite OK Image (.qoi) file in memory, producing the same bytes PixelImage.SaveAsQoi writes to disk.
ToQoiBytes -> Byte Array
Pixel Image: Pixel Image
options: Qoi Image Writer Optionsbyte[] ToQoiBytes(
PixelImage Pixel Image,
QoiImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Qoi Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Tga Bytes
FunctionEncodes the image as a Truevision TGA (.tga) file in memory, producing the same bytes PixelImage.SaveAsTga writes to disk.
ToTgaBytes -> Byte Array
Pixel Image: Pixel Image
options: Tga Image Writer Optionsbyte[] ToTgaBytes(
PixelImage Pixel Image,
TgaImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Tga Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Tightly Packed Rgba Bytes
FunctionLow-level interop conversion.
ToTightlyPackedRgbaBytes(Pixel Image: Pixel Image) -> Byte Array
byte[] ToTightlyPackedRgbaBytes(PixelImage Pixel Image)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
To Web P Bytes
FunctionEncodes the image as a WebP (.webp) file in memory, producing the same bytes PixelImage.SaveAsWebP writes to disk.
ToWebPBytes -> Byte Array
Pixel Image: Pixel Image
options: Web P Image Writer Optionsbyte[] ToWebPBytes(
PixelImage Pixel Image,
WebPImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| options | Web P Image Writer Options | — | Encoder settings; null uses the defaults. |
Returns
| result | Byte Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Update Color Data
FunctionReplaces the image's pixel rows with whatever the updater returns, given the current rows.
UpdateColorData
Pixel Image: Pixel Image
updater: Func<Color Array Array, Color Array Array>void UpdateColorData(
PixelImage Pixel Image,
Func<ColorElement[][], ColorElement[][]> updater)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| updater | Func<Color Array Array, Color Array Array> | — | A function from the current [row][column] pixel grid to the new one. |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Bmp
FunctionEncodes the image as a Windows bitmap (.bmp) file into a stream, starting at its current position; the stream is left open.
WriteBmp
Pixel Image: Pixel Image
stream: Stream
options: Bmp Image Writer Optionsvoid WriteBmp(
PixelImage Pixel Image,
Stream stream,
BmpImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Bmp Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Gif
FunctionEncodes the image as a GIF file into a stream, starting at its current position; the stream is left open.
WriteGif
Pixel Image: Pixel Image
stream: Stream
options: Gif Image Writer Optionsvoid WriteGif(
PixelImage Pixel Image,
Stream stream,
GifImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Gif Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Ico
FunctionEncodes the image as a Windows icon (.ico) file into a stream, starting at its current position; the stream is left open.
WriteIco
Pixel Image: Pixel Image
stream: Stream
options: Ico Image Writer Optionsvoid WriteIco(
PixelImage Pixel Image,
Stream stream,
IcoImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Ico Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Jpeg
FunctionEncodes the image as a baseline JPEG (.jpg) file into a stream, starting at its current position; the stream is left open.
WriteJpeg
Pixel Image: Pixel Image
stream: Stream
options: Jpeg Image Writer Optionsvoid WriteJpeg(
PixelImage Pixel Image,
Stream stream,
JpegImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Jpeg Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Portable Any Map
FunctionEncodes the image as a Netpbm (.ppm/.pgm/.pbm) file into a stream, starting at its current position; the stream is left open.
WritePortableAnyMap
Pixel Image: Pixel Image
stream: Stream
options: Portable Any Map Image Writer Optionsvoid WritePortableAnyMap(
PixelImage Pixel Image,
Stream stream,
PortableAnyMapImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Portable Any Map Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Portable Float Map
FunctionEncodes the image as a Portable FloatMap (.pfm) file into a stream, starting at its current position; the stream is left open.
WritePortableFloatMap
Pixel Image: Pixel Image
stream: Stream
options: Portable Float Map Image Writer Optionsvoid WritePortableFloatMap(
PixelImage Pixel Image,
Stream stream,
PortableFloatMapImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Portable Float Map Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Qoi
FunctionEncodes the image as a Quite OK Image (.qoi) file into a stream, starting at its current position; the stream is left open.
WriteQoi
Pixel Image: Pixel Image
stream: Stream
options: Qoi Image Writer Optionsvoid WriteQoi(
PixelImage Pixel Image,
Stream stream,
QoiImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Qoi Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Tga
FunctionEncodes the image as a Truevision TGA (.tga) file into a stream, starting at its current position; the stream is left open.
WriteTga
Pixel Image: Pixel Image
stream: Stream
options: Tga Image Writer Optionsvoid WriteTga(
PixelImage Pixel Image,
Stream stream,
TgaImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Tga Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write To Stream
FunctionWrites 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.
WriteToStream -> Large Integer
Pixel Image: Pixel Image
writer: BinaryWriterlong WriteToStream(PixelImage Pixel Image, BinaryWriter writer)
Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| writer | BinaryWriter | — | The writer to append to. |
Returns
| result | Large Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Write Web P
FunctionEncodes the image as a WebP (.webp) file into a stream, starting at its current position; the stream is left open.
WriteWebP
Pixel Image: Pixel Image
stream: Stream
options: Web P Image Writer Optionsvoid WriteWebP(
PixelImage Pixel Image,
Stream stream,
WebPImageWriterOptions options)Parameters
| name | type | default | description |
|---|---|---|---|
| Pixel Image | Pixel Image | — | |
| stream | Stream | — | A writable stream to receive the file. |
| options | Web P Image Writer Options | — | Encoder settings; null uses the defaults. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Allocate Pixels
FunctionAllocates a new [row][column] pixel grid of the given size, filled with one color.
AllocatePixels -> Color Array Array
width: Integer
height: Integer
color: Optional ColorColorElement[][] AllocatePixels(
int width,
int height,
ColorElement? color)Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | Number of pixels in each row. |
| height | Integer | — | Number of rows. |
| color | Optional Color | — | The fill color; null leaves every pixel transparent black (all channels 0). |
Returns
| result | Color Array Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
From Flat Array
FunctionCreates an image from a single array of pixels laid out row by row from the top-left corner, the inverse of PixelImage.ToFlatArray.
FromFlatArray -> Pixel Image
width: Integer
height: Integer
flat: Color ArrayPixelImage FromFlatArray(
int width,
int height,
ColorElement[] flat)Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | Number of columns, in pixels. |
| height | Integer | — | Number of rows, in pixels. |
| flat | Color Array | — | Exactly Width × Height pixels; the first Width are the top row. |
Returns
| result | Pixel Image |
Remarks
The pixels are copied, so later changes to Flat do not affect the image.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
From Packed Int Pixels
FunctionCreates an image from rows of 32-bit packed pixels, one uint per pixel, indexed [row][column].
FromPackedIntPixels(packedPixels: Positive Integer Array Array) -> Pixel Image
PixelImage FromPackedIntPixels(uint[][] packedPixels)
Parameters
| name | type | default | description |
|---|---|---|---|
| packedPixels | Positive Integer Array Array | — | The packed pixels, row-major, every row as long as the first. |
Returns
| result | Pixel Image |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
From Packed RGBA Bytes
FunctionOverload 1 of 2
FromPackedRGBABytes -> Pixel Image
width: Integer
height: Integer
rawBytes: Byte ArrayPixelImage 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.
Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | Number of columns, in pixels. |
| height | Integer | — | Number of rows, in pixels. |
| rawBytes | Byte Array | — | Exactly Width × Height × 4 bytes. |
Returns
| result | Pixel Image |
Remarks
The bytes are copied, so later changes to Raw Bytes do not affect the image. A height of 0 gives an empty image.
Overload 2 of 2
FromPackedRGBABytes -> Pixel Image
RGBA: Byte Array
width: Integer
height: IntegerPixelImage FromPackedRGBABytes(
byte[] rgba,
int width,
int height)Legacy overload; Pending consolidation.
Parameters
| name | type | default | description |
|---|---|---|---|
| RGBA | Byte Array | — | |
| width | Integer | — | |
| height | Integer | — |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
From Uri
FunctionLoads an image from a file path or a web address, in any format PixelImage.LoadFromFile accepts.
FromUri(uri: Uri) -> Pixel Image
PixelImage FromUri(Uri uri)
Parameters
| name | type | default | description |
|---|---|---|---|
| uri | Uri | — | A relative path, a file URI, or an http/https URL. |
Returns
| result | Pixel Image |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Get Temp Image Path
FunctionThis node carries no documentation.
GetTempImagePath() -> Text
string GetTempImagePath()
Returns
| result | Text |
Remarks
Should only be used for really getting a temp image path and no longer used for conversion.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Initialize Black Image
FunctionInitialize image with some color
InitializeBlackImage -> Pixel Image
width: Integer
height: Integer
color: Optional ColorPixelImage InitializeBlackImage(
int width,
int height,
ColorElement? color)Parameters
| name | type | default | description |
|---|---|---|---|
| width | Integer | — | |
| height | Integer | — | |
| color | Optional Color | — |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Initialize From Bytes
FunctionRebuilds an image from bytes produced by PixelImage.SerializeIntoBytes.
InitializeFromBytes(data: Byte Array) -> Pixel Image
PixelImage InitializeFromBytes(byte[] data)
Parameters
| name | type | default | description |
|---|---|---|---|
| data | Byte Array | — | The serialized image. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Load From File
FunctionLoad from PNG file.
In reality, supports wider range of input options than PixelImage.LoadFromFile.
LoadFromFile(path: Text) -> Pixel Image
PixelImage LoadFromFile(string path)
Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — |
Returns
| result | Pixel Image |
Remarks
Though officially we support only PNG file on Image.PixelImage; In practice this can load more than that.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Load From File Buffer
FunctionThis node carries no documentation.
LoadFromFileBuffer(fileData: Byte Array) -> Pixel Image
PixelImage LoadFromFileBuffer(byte[] fileData)
Parameters
| name | type | default | description |
|---|---|---|---|
| fileData | Byte Array | — | Png, jpg, bmp, webp... Anything you like! |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Load From Text
FunctionRebuilds an image from Base64 text produced by PixelImage.SaveAsText.
LoadFromText(text: Text) -> Pixel Image
PixelImage LoadFromText(string text)
Parameters
| name | type | default | description |
|---|---|---|---|
| text | Text | — | The Base64 text. |
Returns
| result | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Load Packed Rgba From File Buffer
FunctionDecodes an image straight to tightly packed RGBA bytes, row zero first, without building
a Image.PixelImage on the way.
LoadPackedRgbaFromFileBuffer(fileData: Byte Array) -> (result: Byte Array, width: Integer, height: Integer)
byte[] LoadPackedRgbaFromFileBuffer(
byte[] fileData,
out int width,
out int height)Parameters
| name | type | default | description |
|---|---|---|---|
| fileData | Byte Array | — | Png, jpg, bmp, webp... Anything PixelImage.LoadFromFileBuffer takes. |
Returns
| result | Byte Array |
| width | Integer |
| height | Integer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Read From Stream
FunctionReads an image written by PixelImage.WriteToStream, leaving the reader just past it.
ReadFromStream(reader: BinaryReader) -> (result: Large Integer, value: Pixel Image)
long ReadFromStream(BinaryReader reader, out PixelImage value)
Parameters
| name | type | default | description |
|---|---|---|---|
| reader | BinaryReader | — | The reader positioned at the image. |
Returns
| result | Large Integer |
| value | Pixel Image |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing
Save Raw
FunctionCompact 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.
SaveRaw
path: Text
pixels: Color Array Array
width: Integer
height: Integervoid SaveRaw(
string path,
ColorElement[][] pixels,
int width,
int height)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | |
| pixels | Color Array Array | — | |
| width | Integer | — | |
| height | Integer | — |
Remarks
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.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Pixel Image
- Package
- Image Processing