Edit Image in PowerPoint using Java

Read this guide to edit image in PowerPoint using Java. You will learn image editing in PowerPoint using Java with a list of steps, IDE setup instructions, and sample code. You will also get instructions to enhance the given sample code to create a desired PPT/PPTX.

Steps to Edit a Picture in PowerPoint using Java

  1. Set the IDE to use Aspose.Slides for Java to edit images in a presentation
  2. Load the presentation, find the first picture on the first slide, and replace it with another image
  3. Set a new position for the picture, change its dimensions, flip it to a certain angle, and rotate it a bit
  4. Trim the picture from the left and right sides
  5. Turn the picture to black and white, and add contrast to the picture to make it slightly brighter
  6. Add a colored border around the image
  7. Set a soft gray shadow behind the picture
  8. Add a short description for the picture, and lock the picture to avoid changing its proportions
  9. Save the edited presentation

These steps summarize how to edit photo in PowerPoint using Java. Load the presentation, select the first slide, find the first picture on that slide, and replace its image with a new image from the disk. Change the image position, flip and rotate it, trim its left and right sides, convert it to black and white, add contrast, set a border, add a shadow, and finally add a short text description.

Code for Picture Editing in PowerPoint using Java

This code demonstrates how to change picture in PowerPoint using Java. Search for the target picture by its alternative text or name instead of processing the first picture; search the layout and master slides as well as the normal slides, replace the image data directly in the image collection to update all the slides using this picture, and lock the aspect ratio before resizing. Delete the cropped areas, compress the replaced image, and apply other image effects such as transparency, blur, duotone, or black-and-white threshold for more editing options.

This article teaches how to change picture in PowerPoint. To compress a presentation, refer to the article Compress PowerPoint presentation size using Java.