Class PageImage
- Namespace
- ComOfficeKit
- Assembly
- ComOfficeKit.dll
A page drawn by RenderPage(int, double): BGRA32 pixels, premultiplied, every one opaque,
the top row first. That is what WPF's PixelFormats.Pbgra32 and WinUI's
WriteableBitmap take. The image holds its own copy of the pixels: it needs no disposal and
outlives its document.
public sealed class PageImage
- Inheritance
-
PageImage
- Inherited Members
Properties
Dpi
The dots per inch the page was drawn at.
public double Dpi { get; }
Property Value
Height
The height in pixels.
public int Height { get; }
Property Value
Pixels
public ReadOnlyMemory<byte> Pixels { get; }
Property Value
Stride
The bytes from one row to the next: Width × 4.
public int Stride { get; }
Property Value
Width
The width in pixels.
public int Width { get; }
Property Value
Methods
SavePng(Stream)
Writes the image as a PNG (8-bit RGB) to destination, at its current position. The stream is flushed and left open.
public void SavePng(Stream destination)
Parameters
destinationStreamA writable stream.
SavePng(string)
Writes the image as a PNG file (8-bit RGB), replacing a file already there.
public void SavePng(string path)
Parameters
pathstringWhere to write it.