NodePipeline/NodePipeline.Application/ImageBuffer.cs
2026-01-02 20:55:25 +03:00

20 lines
404 B
C#

namespace NodePipeline.Application;
public struct ImageBuffer
{
public int Width;
public int Height;
public byte[] Pixels; // RGBARGBARGBA...
public readonly Span<byte> GetPixelSpan()
{
return Pixels.AsSpan();
}
public ImageBuffer(int width, int height)
{
Width = width;
Height = height;
Pixels = new byte[Width * Height * 4];
}
}