OfficeIMO

API Reference

Class

PowerPointPicture

Namespace OfficeIMO.PowerPoint
Assembly OfficeIMO.PowerPoint

Represents an image placed on a slide.

Inheritance

Methods

public Void Crop(Double leftPercent, Double topPercent, Double rightPercent, Double bottomPercent) #
Returns: Void

Crops the image by the specified percentages (0-100).

Parameters

leftPercent System.Double requiredposition: 0
topPercent System.Double requiredposition: 1
rightPercent System.Double requiredposition: 2
bottomPercent System.Double requiredposition: 3
public Void FitToBox(Double imageWidth, Double imageHeight, Boolean crop = true) #
Returns: Void

Fits the image into the current shape bounds, optionally cropping to fill.

Parameters

imageWidth System.Double requiredposition: 0
Source image width (pixels).
imageHeight System.Double requiredposition: 1
Source image height (pixels).
crop System.Boolean = true optionalposition: 2
When true, crops to fill the box. When false, resizes to fit.
public Void ResetCrop() #
Returns: Void

Removes any cropping from the image.

UpdateImage 2 overloads
public Void UpdateImage(Stream newImage, ImagePartType type) #
Returns: Void

Replaces the picture's underlying image with the provided stream.

Parameters

newImage System.IO.Stream requiredposition: 0
Stream containing the new image data.
type OfficeIMO.PowerPoint.ImagePartType requiredposition: 1
Image format of the new image.
public Void UpdateImage(String imagePath) #
Returns: Void

Replaces the picture's underlying image with the provided file.

Parameters

imagePath System.String requiredposition: 0
Path to the new image file.

Properties

public String ContentType { get; } #

Gets the MIME content type of the underlying image.

public String MimeType { get; } #

Gets the MIME content type of the underlying image.