Pixels the software rasterizer draws into: premultiplied BGRA, 8 bits per channel, rows top to bottom, in a buffer the caller provides or one rented from a pool and returned on Dispose().
public sealed class Bitmap : IDisposable
Each pixel is four bytes in memory order blue, green, red, alpha; colour channels are premultiplied by alpha (each is at most the
alpha), the layout of BGRA8888 premultiplied surfaces on Windows, Apple platforms, Skia and the HTML canvas after a swizzle.
A pixel covers the half-open square of device space from its integer coordinates (ISO 32000-2 §10.7.4).
Not thread-safe: one writer at a time. A bitmap over caller memory never frees it; disposing only detaches it.
kind:method, kind:property, kind:ctor. Press Esc to clear.Bitmap(Int32, Int32)Initializes a new instance of the Bitmap class over a pooled buffer, every pixel transparent black.Bitmap(Memory<Byte>, Int32, Int32, Int32)Initializes a new instance of the Bitmap class over memory the caller owns; its contents are kept.HeightGets the height in pixels.StrideGets the bytes from the start of one row to the start of the next.WidthGets the width in pixels.Dispose()Returns a pooled buffer to its pool. A bitmap over caller memory leaves the memory alone.GetRow(Int32)Returns the Width × 4 bytes of one row.SavePng(Stream)Writes the bitmap as a PNG image: 8-bit RGB when every pixel is opaque, otherwise 8-bit RGBA with alpha un-premultiplied.