[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.EmbeddedImageData

Class EmbeddedImageData

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents embedded image data.

Derived classes include ImageData.

public class EmbeddedImageData : FormattingBag
Inheritance
object
EmbeddedImageData
Inherited Members
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()

Properties

ContentType

Gets the image content type.

public string ContentType { get; }

Property Value

string

HasImage

Gets a value indicating whether the picture has image bytes.

public virtual bool HasImage { get; }

Property Value

bool

ImageBytes

Gets the raw bytes of the image stored in the picture.

public byte[] ImageBytes { get; }

Property Value

byte[]

Methods

Equals(EmbeddedImageData)

protected bool Equals(EmbeddedImageData other)

Parameters

other EmbeddedImageData

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Save(Stream)

Saves the image into a specified stream.

public virtual void Save(Stream stream)

Parameters

stream System.IO.Stream

The stream where to save the image to.

Save(string)

Saves the image into a file.

public void Save(string fileName)

Parameters

fileName string

The file name where to save the image.

SetImage(Image)

Sets the image that is displayed by the picture.

public void SetImage(Image image)

Parameters

image GrapeCity.Documents.Drawing.Image

The image to set.

SetImage(byte[], string)

Sets the image that is displayed by the picture.

public virtual void SetImage(byte[] bytes, string contentType)

Parameters

bytes byte[]

The byte array of the image.

contentType string

The content type of the image data.

SetImage(Stream, string)

Sets the image that is displayed by the picture.

public void SetImage(Stream stream, string contentType)

Parameters

stream System.IO.Stream

The stream that contains the image.

contentType string

The content type of the image data.

SetImage(Uri, string)

Sets the image that is displayed by the picture.

public virtual void SetImage(Uri uri, string contentType)

Parameters

uri System.Uri

The URI to the image file.

contentType string

The content type of the image data.

ToByteArray()

Returns a byte array representing the image.

public virtual byte[] ToByteArray()

Returns

byte[]

The image bytes.

ToStream()

Creates and returns a stream containing the image bytes.

public virtual Stream ToStream()

Returns

System.IO.Stream

A stream containing the image bytes.