Class ImageExamples
- Namespace
- FileFormat.Slides.Examples
- Assembly
- FileFormat.Slides.Examples.dll
Provides C# code examples for creating, reading, and modifying Presentation images using the FileFormat.Slides library.
public class ImageExamples
- Inheritance
-
ImageExamples
- Inherited Members
Constructors
ImageExamples()
Initializes a new instance of the ImageExamples class. Prepares the directory 'Presentations/Image' for storing or loading PowerPoint(PPT or PPTX) presentations at the root of the project. If the directory doesn't exist, it is created. If it already exists, existing files are deleted, and the directory is cleaned up. Prepares the directory 'Presentations/Existing/Images' to store images to be added to the presentations.
public ImageExamples()
Methods
AddImageInASlide(string, string, string)
This method adds up an image in a slide
public void AddImageInASlide(string documentDirectory = "../../../Presentations/New", string filename = "test.pptx", string imagename = "sample.jpg")
Parameters
documentDirectory
stringPath of the presentation folder
filename
stringPresentation name
imagename
stringPicture or image name
RemoveImageInExistingSlide(string, string)
This method removes the image from presentation
public void RemoveImageInExistingSlide(string documentDirectory = "../../../Presentations/Existing", string filename = "test.pptx")
Parameters
UpdateImageInExistingSlide(string, string, double, double)
This method updates the existing image of a slide
public void UpdateImageInExistingSlide(string documentDirectory = "../../../Presentations/Existing", string filename = "test.pptx", double xAxis = 0, double yAxis = 0)