Compress an Image

Introduction

You can use the CompressImage method to compress an image by specifying target resolution.

The method requires a presentation file name, slide index, and shape index. The shape must be a picture frame, or you will get an exception. You should also specify the resolution (DPI) and/or set the deletePictureCroppedAreas parameter to true.

This method can also be used to delete picture cropped areas.

Below is an example of using the CompressImage method.

cURL Example

SDKs

Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of Aspose.Slides Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.

SDK Examples

SDK Source

The Aspose Cloud SDK’s can be downloaded from the following page: Available SDK’s