PowerPoint PPT to TIFF in Python

TIFF is a popular format that is used for the conversion of PowerPoint presentations to image format. This conversion could be useful for generating thumbnails of the PPT slides. In this article, you will learn how to convert PowerPoint PPT or PPTX to TIFF using Python. Furthermore, you will learn how to customize PPT to TIFF conversion using different options.

Python PowerPoint PPT to TIFF Converter

Aspose.Slides for Python provides high fidelity conversion of PowerPoint presentations to various popular image and document formats. We will use this library to convert our PPT/PPTX presentations to TIFF format. You can install the library from PyPI using the following command.

> pip install aspose.slides

Convert PowerPoint PPTX to TIFF in Python

The conversion of PowerPoint PPT/PPTX to TIFF can be done in a couple of lines of code using Aspose.Slides for Python, as demonstrated below.

  • Load the PowerPoint PPT/PPTX using Presentation class.
  • Save presentation as TIFF using Presentation.save(string, SaveFormat.TIFF) method.

The following code sample shows how to convert a PowerPoint PPTX file to TIFF in Python.

Convert PPT to TIFF with Hidden Slides in Python

Often, the PowerPoint presentations contain hidden slides, which are not included in PPT to TIFF conversion by default. However, you can enable the rendering of hidden slides as demonstrated below.

  • First, load the PowerPoint PPT/PPTX using Presentation class.
  • Then, create an instance of TiffOptions class.
  • Set TiffOptions.show_hidden_slides property to True.
  • Save presentation as TIFF using Presentation.save(string, SaveFormat.TIFF, TiffOptions) method.

The following code sample shows how to include hidden slides in PPT to TIFF conversion.

PPT to TIFF - Customize Compression and Image Size

You can also customize the size of resultant TIFF images during the conversion. Moreover, you can change the default compression type of the converted TIFF image. The following steps show how to set compression type and image size in PowerPoint PPT to TIFF conversion.

  • First, load the PowerPoint PPT/PPTX using Presentation class.
  • Then, create an instance of TiffOptions class.
  • Set image dimensions using TiffOptions.image_size property.
  • Set compression type using TiffOptions.compression_type property.
  • Convert PPT to TIFF using Presentation.save(string, SaveFormat.TIFF, TiffOptions) method.

The following code sample shows how to convert PPTX to TIFF with custom image size and compression.

Python PowerPoint to TIFF with Custom Pixel Format

Aspose.Slides for Python also allows you to set the pixel format of the resultant TIFF image. This can be achieved by following the steps below.

  • Load the PPT/PPTX presentation using Presentation class.
  • Create an instance of TiffOptions class.
  • Set desired pixel format using TiffOptions.pixel_format property.
  • Convert presentation to TIFF using Presentation.save(string, SaveFormat.TIFF, TiffOptions) method.

The following code sample shows how to customize pixel format in PPT to TIFF conversion using Python.

Get a Free License

You can use Aspose.Slides for Python without evaluation limitations by requesting a temporary license.

Conclusion

In this article, you have learned how to convert PowerPoint PPT to TIFF in Python. Furthermore, you have seen how to customize the image size, include hidden slides, set compression type, and define the pixel format of the resultant TIFF. Besides, you can visit the documentation to explore other features of Aspose.Slides for Python. Also, you can post your questions or queries to our forum.

See Also