Files
pptx-image-compress/README.md
2025-09-10 15:51:01 +02:00

54 lines
2.0 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# PPTX Image Compressor (CaesiumCLT only)
**Version 1.1.2**
Dieses Paket enthält:
```
PPTX-Image-Compressor/
├─ README.md
├─ install_and_run.bat
├─ pptx_image_compress.py
├─ bin/
│ └─ caesiumclt.exe
└─ samples/
└─ README.txt
```
## Schnellstart (ohne Admin-Rechte)
1) Doppelklicke `install_and_run.bat` **oder** rufe es in CMD/PowerShell auf, z.B.:
**Single**
```bat
install_and_run.bat -i "C:\Slides\Deck.pptx" -t 8 -q 90
```
**Batch**
```bat
install_and_run.bat -i "C:\Slides\*.pptx" -O "C:\Slides\out" -t 8 -q 85
install_and_run.bat --input-dir "C:\Slides" --recursive -O "C:\Slides\out" -q 80
```
Die Batch lädt bei Bedarf automatisch das **Windows Embeddable Python Package**, entpackt es lokal und führt das Tool aus.
## Was das Tool macht
- Entpackt die PPTX in einen TempOrdner
- Komprimiert **JPG/JPEG, PNG, WebP** mit **CaesiumCLT** (Default `-q 90`, `-O bigger`)
- Ersetzt Bilder nur, wenn die komprimierte Datei kleiner ist
- Schreibt ein CSVLog (`.log` neben der OutputPPTX)
- Baut eine neue PPTX und zeigt eine Summary (Name, Größe vorher/nachher, Ersparnis %, Zeit)
- Räumt alle temporären Dateien auf (keine CaesiumTempfiles in der finalen PPTX)
## Hinweise
- **GIF** wird übersprungen (keine Rekodierung).
- `-t` steuert die Parallelität der PythonThreads; intern wird `caesiumclt --threads 1` gesetzt, sobald `-t > 1`, um Oversubscription zu vermeiden. Default ist 16
- `-q` steuert das Qualitätslevel; intern wird `caesiumclt -q` mit diesem Wert von `0..100` benutzt, Default ist 90
- Die Batch **verwendet bevorzugt das Embeddable Python** neben der BAT; ansonsten sucht sie echte `python.exe`/`py.exe` im PATH, **ignoriert** aber die MicrosoftStoreAliasPfade (`WindowsApps`).
## Manuelle Nutzung des .py (falls Python vorhanden)
```bat
python pptx_image_compress.py -i "C:\Pfad\input.pptx" -t 8
```
## Quellen & Tools
- CaesiumCLT Projekt/Downloads: https://github.com/Lymphatus/caesium-clt
- Windows Embeddable Python Package Doku/Downloads: https://docs.python.org/3/using/windows.html