[]
Represents embedded image data.
Derived classes include ImageData.
public class EmbeddedImageData : FormattingBag
Gets the image content type.
public string ContentType { get; }
Gets a value indicating whether the picture has image bytes.
public virtual bool HasImage { get; }
Gets the raw bytes of the image stored in the picture.
public byte[] ImageBytes { get; }
protected bool Equals(EmbeddedImageData other)
other EmbeddedImageDatapublic override bool Equals(object obj)
obj objectpublic override int GetHashCode()
Saves the image into a specified stream.
public virtual void Save(Stream stream)
stream StreamThe stream where to save the image to.
Saves the image into a file.
public void Save(string fileName)
fileName stringThe file name where to save the image.
Sets the image that is displayed by the picture.
public void SetImage(Image image)
image ImageThe image to set.
Sets the image that is displayed by the picture.
public virtual void SetImage(byte[] bytes, string contentType)
Sets the image that is displayed by the picture.
public void SetImage(Stream stream, string contentType)
stream StreamThe stream that contains the image.
contentType stringThe content type of the image data.
Sets the image that is displayed by the picture.
public virtual void SetImage(Uri uri, string contentType)
Returns a byte array representing the image.
public virtual byte[] ToByteArray()
The image bytes.
Creates and returns a stream containing the image bytes.
public virtual Stream ToStream()
A stream containing the image bytes.