Collect Jimmy Kimmel Live and Hollywood block references; skip AVIF frames in the contact sheet
This commit is contained in:
1 parent
888897cac9
commit
3eb2ae5e3c
2 files changed
+16
-2
No files matched your search
+8
-2
@@ -339,12 +339,18 @@ def cmd_sheet(args) -> int:
|
||||
images = []
|
||||
for row in rows:
|
||||
path = out_dir / row["file"]
|
||||
if path.is_file():
|
||||
if not path.is_file():
|
||||
continue
|
||||
try:
|
||||
with Image.open(path) as img:
|
||||
img.load()
|
||||
images.append(img.convert("RGB"))
|
||||
except Exception as exc: # noqa: BLE001 - AVIF/misnamed or corrupt frames
|
||||
print(f" skip unreadable {path.name}: {exc.__class__.__name__}",
|
||||
file=sys.stderr)
|
||||
if not images:
|
||||
sys.exit("error: no downloaded frames in this folder")
|
||||
sys.exit("error: no readable frames in this folder (convert AVIF/webp "
|
||||
"files with ffmpeg first)")
|
||||
cell = 320
|
||||
cols = 4
|
||||
rows_count = (len(images) + cols - 1) // cols
|
||||
|
||||
Reference in new issue
Block a user