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)

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.

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.2.tar.gz (3.3 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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slidecompress-0.1.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for slidecompress-0.1.2.tar.gz
Algorithm Hash digest
SHA256 257151f5ec847fa08db1f18f220246b3d93630db317a6ddf0742376636017791
MD5 f0f84fb9ec415ac0b96bfdcd3873688c
BLAKE2b-256 73e24279d1a4204b4be5ab8d0d3d584cea78f3d23c564b22752daa0e7e8f7072

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slidecompress-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for slidecompress-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b8fce53107b39b703ac3eb1d881ebdd5f358049b23aaf1f5774535aefd330e4b
MD5 b880fb5b1a395551b80f9ff9c43f959f
BLAKE2b-256 8acca5d9ad403304f9c497057660442a37561d550a4c3a2ef41b7324f5c1a29e

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