API Reference

Class

HtmlImageDataUri

Namespace OfficeIMO.Html
Assembly OfficeIMO.Html
Modifiers sealed

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

Inheritance

  • Object
  • HtmlImageDataUri

Usage

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

Accepted by parameters

Methods

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

Decodes the image payload as bytes.

public String DecodeText() #
Returns: String

Decodes the payload as UTF-8 text.

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 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 FileExtension { get; } #

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