# Convert PPT to GIF in PHP

> Convert PPT files to animated GIFs in PHP with Aspose.Slides. Use the sample code to export a PowerPoint 97-2003 presentation as an animated GIF.

Source: https://products.aspose.com/slides/php-java/conversion/ppt-to-gif/
Updated: 2026-08-11



## Convert PPT to GIF in PHP

Convert PPT files to GIF programmatically with [*Aspose.Slides for PHP via Java*](/slides/php-java/). Load a PowerPoint 97-2003 presentation and save it as an animated GIF with a few lines of PHP code.

Aspose.Slides performs the conversion through the `Presentation` class and its `save` method. You can also try the PPT-to-GIF conversion in your [browser](https://products.aspose.app/slides/conversion) before integrating it into your application.

You can install the library from [Composer](https://packagist.org/packages/aspose/slides) using the following command:

### Console/Terminal

```console
composer require aspose/slides
```

## How to Convert PPT to GIF in PHP

These are the steps to convert a PPT file to GIF using PHP.

Load the PPT file into a `Presentation` instance.

Call `save` with the output file path and `SaveFormat::Gif`.

The presentation is written to the specified GIF file.

## System Requirements

Before running the PHP conversion sample, make sure that you have the following prerequisites.

1. Install PHP 7 or later, add the PHP directory to the system `PATH`, and set `allow_url_include` to `On` in `php.ini`.
1. Install JRE 8 and set the `JAVA_HOME` environment variable to the installed JRE directory.
1. Install Apache Tomcat 8.0 as described in the [installation guide](https://docs.aspose.com/slides/php-java/installation/).

### This sample code shows PPT-to-GIF conversion in PHP

```php
$presentation = new Presentation("input.ppt");
try {
    $presentation->save("output.gif", SaveFormat::Gif);
} finally {
    $presentation->dispose();
}
```

## Save PPT as GIF in PHP

Use the free app to see a demonstration of the PPT-to-GIF conversion process.

## Other Supported Conversions

- [PPT TO BMP](/slides/php-java/conversion/ppt-to-bmp/) — Bitmap Image
- [PPT TO FODP](/slides/php-java/conversion/ppt-to-fodp/) — OpenDocument Flat XML Presentation
- [PPT TO HTML](/slides/php-java/conversion/ppt-to-html/) — Hypertext Markup Language
- [PPT TO JPG](/slides/php-java/conversion/ppt-to-jpg/) — JPEG Image
- [PPT TO ODP](/slides/php-java/conversion/ppt-to-odp/) — OpenDocument Presentation Format
- [PPT TO OTP](/slides/php-java/conversion/ppt-to-otp/) — OpenDocument Presentation Template
- [PPT TO PDF](/slides/php-java/conversion/ppt-to-pdf/) — Portable Document Format
- [PPT TO PNG](/slides/php-java/conversion/ppt-to-png/) — Portable Network Graphics
- [PPT TO POT](/slides/php-java/conversion/ppt-to-pot/) — PowerPoint 97-2003 Template
- [PPT TO POTM](/slides/php-java/conversion/ppt-to-potm/) — Macro-Enabled PowerPoint Template
- [PPT TO POTX](/slides/php-java/conversion/ppt-to-potx/) — Open XML PowerPoint Template
- [PPT TO PPS](/slides/php-java/conversion/ppt-to-pps/) — PowerPoint 97-2003 Slide Show
- [PPT TO PPSM](/slides/php-java/conversion/ppt-to-ppsm/) — Macro-Enabled PowerPoint Slide Show
- [PPT TO PPSX](/slides/php-java/conversion/ppt-to-ppsx/) — Open XML PowerPoint Slide Show
- [PPT TO PPTM](/slides/php-java/conversion/ppt-to-pptm/) — Macro-Enabled PowerPoint Presentation
- [PPT TO PPTX](/slides/php-java/conversion/ppt-to-pptx/) — Open XML PowerPoint Presentation
- [PPT TO SVG](/slides/php-java/conversion/ppt-to-svg/) — Scalable Vector Graphics
- [PPT TO SWF](/slides/php-java/conversion/ppt-to-swf/) — Small Web Format
- [PPT TO TIFF](/slides/php-java/conversion/ppt-to-tiff/) — Tagged Image File Format
- [PPT TO XPS](/slides/php-java/conversion/ppt-to-xps/) — XML Paper Specification
