Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeRasterImage

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

Dependency-free RGBA raster image buffer.

Inheritance

  • Object
  • OfficeRasterImage

Remarks

Pixels use tightly packed, top-to-bottom, straight-alpha RGBA bytes. The mutable image is not thread-safe. Pixel writes outside the canvas are clipped; pixel reads require in-bounds coordinates.

Usage

Explore 123 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 46

Accepted by parameters 77

Constructors

public OfficeRasterImage(Int32 width, Int32 height, OfficeColor? background = null) #

Creates a new RGBA image buffer.

Parameters

width System.Int32 requiredposition: 0
height System.Int32 requiredposition: 1
background OfficeIMO.Drawing.OfficeColor? = null optionalposition: 2

Methods

public Void BlendPixel(Int32 x, Int32 y, OfficeColor color) #
Returns: Void

Alpha blends a pixel over the current pixel. Coordinates outside the canvas are ignored.

Parameters

x System.Int32 requiredposition: 0
y System.Int32 requiredposition: 1
color OfficeIMO.Drawing.OfficeColor requiredposition: 2
public OfficeRasterImage Clone() #
Returns: OfficeRasterImage

Returns an independent image with the same dimensions and RGBA samples.

public Void Fill(OfficeColor color) #
Returns: Void

Fills the whole image with a color.

Parameters

color OfficeIMO.Drawing.OfficeColor requiredposition: 0
public static OfficeRasterImage FromRgba32(Int32 width, Int32 height, Byte[] pixels) #
Returns: OfficeRasterImage

Creates an image from tightly packed, top-to-bottom RGBA bytes, copying the caller's buffer.

Parameters

width System.Int32 requiredposition: 0
height System.Int32 requiredposition: 1
pixels System.Byte[] requiredposition: 2
public OfficeColor GetPixel(Int32 x, Int32 y) #
Returns: OfficeColor

Gets the color of a pixel.

Parameters

x System.Int32 requiredposition: 0
y System.Int32 requiredposition: 1
public Byte[] GetPixels() #
Returns: Byte[]

Returns an independent copy of the tightly packed RGBA pixels.

public Void SetPixel(Int32 x, Int32 y, OfficeColor color) #
Returns: Void

Sets a pixel without alpha blending. Coordinates outside the canvas are ignored.

Parameters

x System.Int32 requiredposition: 0
y System.Int32 requiredposition: 1
color OfficeIMO.Drawing.OfficeColor requiredposition: 2

Properties

public Int32 Width { get; } #

Image width in pixels.

public Int32 Height { get; } #

Image height in pixels.