[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.PictureCollection.Add

Add Method

Add()

Adds a Picture to this collection at the End location.

Declaration
public Picture Add()
Returns
Type Description
Picture

The added Picture.

Add(byte[], string)

Adds a Picture to this collection at the End location.

Declaration
public Picture Add(byte[] imageBytes, string contentType)
Parameters
Type Name Description
byte[] imageBytes

The image data representing the picture.

string contentType

The content type of the image data.

Returns
Type Description
Picture

The added Picture.

Add(Image)

Adds a Picture to this collection at the End location.

Declaration
public Picture Add(Image image)
Parameters
Type Name Description
Image image

The GrapeCity.Documents.Drawing.Image object representing the picture.

Returns
Type Description
Picture

The added Picture. The size of the picture is set to the size of the source image.

Remarks

Note than this overload inspects the image's Exif rotation data and applies an appropriate picture rotation.

Add(byte[], string, float, float)

Adds a Picture to this collection at the End location.

Declaration
public Picture Add(byte[] imageBytes, string contentType, float width, float height)
Parameters
Type Name Description
byte[] imageBytes

The image data representing the picture.

string contentType

The content type of the image data.

float width

The picture's width, in points.

float height

The picture's height, in points.

Returns
Type Description
Picture

The added Picture.