Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

HtmlImageDataUri

Namespace OfficeIMO.Html
Assembly OfficeIMO.Html
Source revision 33d062b583cb with working tree changes
Modifiers sealed

Represents an image data URI split into media type, encoding metadata, and payload.

Inheritance

  • Object
  • HtmlImageDataUri

Usage

Explore 1 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

Methods

public Byte[] DecodeBytes() #
Returns: Byte[]

Decodes the image payload as bytes.

public String DecodeText() #
Returns: String

Decodes the payload using its declared charset, or UTF-8 when none is declared.

public Int64 EstimateDecodedByteCount() #
Returns: Int64

Estimates decoded byte count without allocating decoded content when possible.

public static String GetFileExtension(String mediaType) #
Returns: String

Gets the suggested file extension for an image media type.

Parameters

mediaType System.String requiredposition: 0
public Boolean TryDecodeBytes(out Byte[] bytes) #
Returns: Boolean

Attempts to decode the image payload as bytes.

Parameters

bytes System.Byte[] requiredposition: 0
public Boolean TryDecodeText(out String text) #
Returns: Boolean

Attempts to decode the payload using its declared charset, or UTF-8 when none is declared.

Parameters

text System.String requiredposition: 0
public Boolean TryEstimateDecodedByteCount(out Int64 byteCount) #
Returns: Boolean

Attempts to estimate decoded byte count without throwing for malformed payloads.

Parameters

byteCount System.Int64 requiredposition: 0
public static Boolean TryParse(String? source, out HtmlImageDataUri dataUri) #
Returns: Boolean

Tries to parse an image data URI.

Parameters

source System.String? requiredposition: 0
dataUri OfficeIMO.Html.HtmlImageDataUri requiredposition: 1

Properties

public String Metadata { get; } #

Data URI metadata without the leading data: prefix.

public String MediaType { get; } #

Declared image media type, for example image/png.

public String Data { get; } #

Raw payload after the comma separator.

public Boolean IsBase64 { get; } #

Indicates whether the payload is base64 encoded.

public String Fragment { get; } #

URL fragment suffix, including the leading hash when present.

public String FileExtension { get; } #

Suggested file extension for the media type, including the leading dot.