Discore
Show / Hide Table of Contents

Constructor DiscordImageData

| Improve this Doc View Source

DiscordImageData(string, string)

Creates image data from the base64 encoded string of an image.

Declaration
public DiscordImageData(string base64Data, string mediaType)
Parameters
Type Name Description
string base64Data
string mediaType

A supported media type (e.g. image/jpeg, image/png, or image/gif).

| Improve this Doc View Source

DiscordImageData(byte[], string)

Creates image data from raw image data.

Declaration
public DiscordImageData(byte[] imageData, string mediaType)
Parameters
Type Name Description
byte[] imageData
string mediaType

A supported media type (e.g. image/jpeg, image/png, or image/gif).

Exceptions
Type Condition
ArgumentNullException

Thrown if imageData is null.

| Improve this Doc View Source

DiscordImageData(ArraySegment<byte>, string)

Creates image data from raw image data.

Declaration
public DiscordImageData(ArraySegment<byte> imageData, string mediaType)
Parameters
Type Name Description
ArraySegment<byte> imageData
string mediaType

A supported media type (e.g. image/jpeg, image/png, or image/gif).

Exceptions
Type Condition
ArgumentException

Thrown if imageData.Array is null.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX