Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfImage

OfficeIMO.Rtf

Namespace
OfficeIMO.Rtf
Assembly
OfficeIMO.Rtf
Source revision
ba882f6b0d07 with working tree changes
Implements
IRtfCloneable IRtfBlock IRtfInline
Modifiers
sealed

RTF picture payload preserved without external imaging dependencies.

Inheritance

  • object
  • RtfImage

Usage

Explore 6 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.

Accepted by parameters 1

Constructors

public RtfImage(RtfImageFormat format, byte[] data) #

Creates an image block.

Parameters

format OfficeIMO.Rtf.RtfImageFormat required
data byte[] required

Methods

public RtfImageLayout ResolveLayout(double? fallbackWidthTwips = null, double? fallbackHeightTwips = null) #

Resolves the picture's unscaled and visible sizes in twips. Pixel sizes use 96 DPI when no goal size is supplied.

Parameters

fallbackWidthTwips double? = null optional
fallbackHeightTwips double? = null optional

Properties

public RtfImageFormat Format { get; set; } #

Image format.

public byte[] Data { get; set; } #

Raw image bytes.

public long PayloadLength { get; } #

Available decoded byte length without materializing a deferred source payload.

public int? SourceWidth { get; set; } #

Original width in pixels when present.

public int? SourceHeight { get; set; } #

Original height in pixels when present.

public int? DesiredWidthTwips { get; set; } #

Desired width in twips when present.

public int? DesiredHeightTwips { get; set; } #

Desired height in twips when present.

public int? ScaleXPercent { get; set; } #

Horizontal picture scale as a percentage. An omitted value means 100.

public int? ScaleYPercent { get; set; } #

Vertical picture scale as a percentage. An omitted value means 100.

public int? CropLeftTwips { get; set; } #

Unscaled twips cropped from the left edge. Negative values add space.

public int? CropTopTwips { get; set; } #

Unscaled twips cropped from the top edge. Negative values add space.

public int? CropRightTwips { get; set; } #

Unscaled twips cropped from the right edge. Negative values add space.

public int? CropBottomTwips { get; set; } #

Unscaled twips cropped from the bottom edge. Negative values add space.

public string? Description { get; set; } #

Alternative text or description.