SVG-Compress hinzugefügt via svg-polish python module
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
# PPTX Image Compressor (CaesiumCLT only)
|
||||
**Version 1.1.7**
|
||||
**Version 1.1.8**
|
||||
|
||||
Dieses Paket enthält:
|
||||
|
||||
@@ -27,26 +27,28 @@ 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.
|
||||
Zusätzlich wird **pip** installiert, damit das **svg-polish** Modul installiert werden kann.
|
||||
|
||||
|
||||
## Was das Tool macht
|
||||
- Entpackt die PPTX in einen Temp‑Ordner
|
||||
- Komprimiert **JPG/JPEG, PNG, WebP, GIF** mit **CaesiumCLT** (Default `-q 90`, `-O bigger`)
|
||||
- Komprimiert **SVG** mit **svg-polish** (Default-Modus: `agressive`)
|
||||
- Ersetzt Bilder nur, wenn die komprimierte Datei kleiner ist
|
||||
- Versucht bei PNG zusätzlich einen PNG->JPG Wechsel, wenn das Bild nach Kompression noch größer als 500 KB ist
|
||||
- Ersetzt Bilder nur, wenn sei mindestens 2% kleiner sind (verhindert *doppelte Komprimierung*)
|
||||
- Schreibt ein CSV‑Log (`.log` neben der Output‑PPTX)
|
||||
Baut eine neue PPTX und zeigt eine Summary (Name, Größe vorher/nachher, Ersparnis %, Zeit)
|
||||
- Räumt alle temporären Dateien auf (keine Caesium‑Tempfiles in der finalen PPTX)
|
||||
- Baut eine neue PPTX und zeigt eine Summary (Name, Größe vorher/nachher, Ersparnis %, Zeit)
|
||||
|
||||
## Änderungen in 1.1.7
|
||||
- PNG->JPG Fallback für große PNGs (> 500 KB nach Kompression) hinzugefügt
|
||||
- CSV-Logging um `image_type_changed` erweitert (`png_jpg` bei Typwechsel)
|
||||
## Änderungen in 1.1.8
|
||||
- SVG Files werden bei Vorhandensein von svg-polish anhand von 2 Profilen optimiert: balanced|agressive
|
||||
|
||||
## Hinweise
|
||||
- `-t` steuert die Parallelität der Python‑Threads; 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
|
||||
- `--min-savings` steuert das Mindestmass an Komprimierung zur Verhinderung von doppelter Komprimierunt, Default ist 2%
|
||||
- Die Batch **verwendet bevorzugt das Embeddable Python** neben der BAT; ansonsten sucht sie echte `python.exe`/`py.exe` im PATH, **ignoriert** aber die Microsoft‑Store‑Alias‑Pfade (`WindowsApps`).
|
||||
- `--svg-profile` steuert das Vector-Optimierungsprofil `balanced|agressive`
|
||||
|
||||
## Manuelle Nutzung des .py (falls Python vorhanden)
|
||||
```bat
|
||||
@@ -55,4 +57,5 @@ python pptx_image_compress.py -i "C:\Pfad\input.pptx" -t 8
|
||||
|
||||
## Quellen & Tools
|
||||
- CaesiumCLT – Projekt/Downloads: https://github.com/Lymphatus/caesium-clt
|
||||
- SVG Polish - https://github.com/g-battaglia/svg_polish
|
||||
- Windows Embeddable Python Package – Doku/Downloads: https://docs.python.org/3/using/windows.html
|
||||
Reference in New Issue
Block a user