From 012d2eb87f76dbd4586b3e68f6558b04a8ba723f Mon Sep 17 00:00:00 2001 From: Rory Fewell Date: Thu, 27 Feb 2025 17:58:24 +0000 Subject: [PATCH] Prelim: themgood - skip BMPs that PIL doesn't like, print error and continue --- tools/theme/themgood.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/theme/themgood.py b/tools/theme/themgood.py index 153b7cc..2ce5a6b 100644 --- a/tools/theme/themgood.py +++ b/tools/theme/themgood.py @@ -77,7 +77,11 @@ def main(): args[0] = "BGRA" im.tile = [im.tile[0]._replace(args=tuple(args))] - im.save("out/" + str(entry.name) + ".png") + try: + im.save("out/" + str(entry.name) + ".png") + except Exception as e: + print("Unhappy with " + str(entry.name)) + print(e) if __name__ == "__main__":