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

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.1.tar.gz (3.2 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.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slidecompress-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 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.1.tar.gz
Algorithm Hash digest
SHA256 769359f961c743d43489657c551f8b12986746a05e6b9f72b345b81655986246
MD5 c101ae935739431b384b84fcd19abd05
BLAKE2b-256 29dce28a10c1539c78cdbe9b64f0b01f1cd40e6d0f0a3721854b78a618ea25db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slidecompress-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 175eca34f54d81aa4a5e6505235859b9c260d767485af270a5f67919e8166ea5
MD5 13c84a51052dbe090dd089968727f614
BLAKE2b-256 2edc389d46657dae54245691215f6a9f429677abc68a6a2cce45ee0c6ff9699f

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