DataUrl.DecodeBytes Method

Definition

Overloads

Name Description
DecodeBytes(String)

Decodes the base64 payload from a data URL string.

DecodeBytes(Uri)

Decodes the base64 payload from a data URL Uri.

DecodeBytes(String)

Source:
DataUrl.cs

Decodes the base64 payload from a data URL string.

public static byte[] DecodeBytes(string dataUrl);
static member DecodeBytes : string -> byte[]
Public Shared Function DecodeBytes (dataUrl As String) As Byte()

Parameters

dataUrl
String

A data URL string (e.g., data:text/plain;base64,SGVs...).

Returns

Byte[]

The decoded bytes.

Exceptions

dataUrl is null.

The string is not a data URL or does not contain a valid base64 payload.

Applies to

DecodeBytes(Uri)

Source:
DataUrl.cs

Decodes the base64 payload from a data URL Uri.

public static byte[] DecodeBytes(Uri uri);
static member DecodeBytes : Uri -> byte[]
Public Shared Function DecodeBytes (uri As Uri) As Byte()

Parameters

uri
Uri

A data URL (e.g., data:image/png;base64,iVBOR...).

Returns

Byte[]

The decoded bytes.

Exceptions

uri is null.

The URI is not a data URL or does not contain a valid base64 payload.

Applies to