Skip to main content

Compress PowerPoint presentations by optimizing embedded images

Project description

slidecompress

A command-line tool that reduces PowerPoint file sizes by intelligently compressing embedded images while maintaining visual quality.

Features

  • Automatically resizes large images to reasonable dimensions (1000x1000 max)
  • Optimizes PNG files by reducing colors to 255 while maintaining quality
  • Compresses JPEG files with balanced quality settings (75% quality)
  • Converts TIF/TIFF/EMF files to optimized PNGs
  • Preserves original files by creating a new .compressed.pptx file
  • Shows detailed compression statistics for each image
  • Reports which slides contain the largest remaining images

Requirements

  • Python 3.6+
  • ImageMagick (magick command must be available in PATH)
  • LibreOffice for EMF conversions (libreoffice command must be available in PATH)

Usage

First, compress all images in PowerPoint.

Then, run the tool:

uvx slidecompress presentation.pptx

Or with custom maximum image width:

uvx slidecompress --width 480 presentation.pptx

The compressed file will be saved as presentation.compressed.pptx in the same directory.

To overwrite the original file, use the -f flag:

uvx slidecompress -f presentation.pptx

Example Output

     image1.png:      9.7KB compressed by      1.4KB
     image2.png:      4.5KB
     image3.jpeg:    19.6KB compressed by      2.3KB
     image4.emf:     98.2KB compressed by     25.3KB and converted to .png
Largest media after compression:
      image4.emf:     72.9KB in slide 4
     image3.jpeg:     17.3KB in slide 3
      image1.png:      8.3KB in slide 1
      image2.png:      4.5KB in slide 2

Build

To build and upload to PyPI:

  1. Update the version in pyproject.toml
  2. Build and upload the package
rm -rf dist/
uvx --from build pyproject-build
uvx twine upload -u __token__ dist/*

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slidecompress-0.1.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slidecompress-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file slidecompress-0.1.4.tar.gz.

File metadata

  • Download URL: slidecompress-0.1.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for slidecompress-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d088f805d75fd9e4101f1b326e4ddccac2d2823f3674d8b3ebac03353dfcb698
MD5 5a3205ccf1a780a6fc71235c1c8ef6ef
BLAKE2b-256 95ade23dde57164bb55c59d49abfeb8e0680930209a636cfb367905880702b8c

See more details on using hashes here.

File details

Details for the file slidecompress-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: slidecompress-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for slidecompress-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1282e382bcaf0ebcda9caf35f3c0e2561edfad686a8e9d3fa9c64d6b2a670d
MD5 5778b372f6f2dda116f457cca3edf995
BLAKE2b-256 6043a06a8f7f6eb3efa8e9684989fe138ac85e768439681808ade42f1bb67631

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page