Bump up libcaesium to 1.1.0, now also supporting gif

This commit is contained in:
2025-10-30 10:07:56 +01:00
parent f0d07dab4b
commit f498cafdf3
2 changed files with 1 additions and 7 deletions

Binary file not shown.

View File

@@ -91,7 +91,7 @@ def compress_with_caesium(original: Path, out_dir: Path, caesium_threads: int |
raise RuntimeError("[ERROR] 'caesiumclt' wurde nicht gefunden. Bitte CaesiumCLT installieren und in PATH verfügbar machen.") raise RuntimeError("[ERROR] 'caesiumclt' wurde nicht gefunden. Bitte CaesiumCLT installieren und in PATH verfügbar machen.")
out_dir.mkdir(parents=True, exist_ok=True) out_dir.mkdir(parents=True, exist_ok=True)
ext = original.suffix.lower() ext = original.suffix.lower()
if ext not in {".jpg", ".jpeg", ".png", ".webp"}: if ext not in {".jpg", ".jpeg", ".png", ".webp", ".gif"}:
return None return None
cmd = [exe, "-q", str(quality), "-O", "bigger", "-o", str(out_dir)] cmd = [exe, "-q", str(quality), "-O", "bigger", "-o", str(out_dir)]
if caesium_threads is not None: if caesium_threads is not None:
@@ -173,12 +173,6 @@ def process_single_deck(input_pptx: Path, output_pptx: Path, threads: int, quali
nonlocal done_count nonlocal done_count
ext = img_path.suffix.lower() ext = img_path.suffix.lower()
orig_size = img_path.stat().st_size orig_size = img_path.stat().st_size
if ext == ".gif":
with lock:
done_count += 1
log_lines.append(f"{img_path.name};{human_kb(orig_size)};{human_kb(orig_size)};0;0.0\n")
print_progress(done_count, total)
return
chosen_size = orig_size chosen_size = orig_size
try: try:
out_sub = scratch_dir / f"img_{idx:06d}" out_sub = scratch_dir / f"img_{idx:06d}"