Skip to main content

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

Metadata

Release files for slidecompress 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slidecompress 0.1.4
File Size Uploaded Provenance Actions
slidecompress-0.1.4.tar.gz 3.5 kB Without provenance Details for slidecompress-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slidecompress 0.1.4
File Interpreter ABI Platform Actions
slidecompress-0.1.4-py3-none-any.whl Python 3 none any Details for slidecompress-0.1.4-py3-none-any.whl

Total release size: 7.6 kB

Release files / slidecompress-0.1.4.tar.gz

Download URL slidecompress-0.1.4.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d088f805d75fd9e4101f1b326e4ddccac2d2823f3674d8b3ebac03353dfcb698
BLAKE2b-256 checksum
How to use checksums
95ade23dde57164bb55c59d49abfeb8e0680930209a636cfb367905880702b8c
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / slidecompress-0.1.4-py3-none-any.whl

Download URL slidecompress-0.1.4-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a1282e382bcaf0ebcda9caf35f3c0e2561edfad686a8e9d3fa9c64d6b2a670d
BLAKE2b-256 checksum
How to use checksums
6043a06a8f7f6eb3efa8e9684989fe138ac85e768439681808ade42f1bb67631
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for slidecompress 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page