Struct MemoryImage

MemoryImage structure

Represents an image file stored as an in-memory byte array

public struct MemoryImage : IEquatable<MemoryImage>

Constructors

NameDescription
MemoryImage(ArraySegment<byte>)
MemoryImage(byte[])
MemoryImage(Func<ArraySegment<byte>>)
MemoryImage(string)

Properties

NameDescription
static Empty { get; }
Content { get; }Gets the file bytes of the image.
FileExtension { get; }Gets the most appropriate extension string for this image.
IsDds { get; }Gets a value indicating whether this object represents a valid DDS image.
IsEmpty { get; }
IsExtendedFormat { get; }Gets a value indicating whether this object represents an image backed by a glTF extension.
IsJpg { get; }Gets a value indicating whether this object represents a valid JPG image.
IsKtx2 { get; }Gets a value indicating whether this object represents a valid KTX2 image.
IsPng { get; }Gets a value indicating whether this object represents a valid PNG image.
IsValid { get; }Gets a value indicating whether this object represents a valid image.
IsWebp { get; }Gets a value indicating whether this object represents a valid WEBP image.
MimeType { get; }Gets the most appropriate Mime type string for this image.
SourcePath { get; }Gets the source path of this image, or null.

Methods

NameDescription
Equals(MemoryImage)
override Equals(object)
override GetHashCode()
IsImageOfType(string)identifies an image of a specific type.
Open()Opens the image file for reading its contents
SaveToFile(string)Saves the image stored in this MemoryImage to a file.
ToDebuggerDisplay()
static AreEqual(MemoryImage, MemoryImage)
static TryParseMime64(string, out MemoryImage)Tries to parse a Mime64 string to MemoryImage
operator ==
implicit operator(3 operators)
operator !=

See Also