MemoryImage

MemoryImage struct

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

public struct MemoryImage : IEquatable<MemoryImage>

Constructors

NameDescription
MemoryImage(ArraySegment<byte>)Initializes a new instance of the MemoryImage class.

Properties

NameDescription
Content { get; }Gets the file bytes of the image.
Empty { get; }
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
AreEqual(MemoryImage, MemoryImage)
Equals(MemoryImage)
Equals(object)
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()
TryParseMime64(string, out MemoryImage)Tries to parse a Mime64 string to MemoryImage

Operators

NameDescription
operator MemoryImage
operator MemoryImage
operator MemoryImage
operator ==
operator !=

See Also