perf: only calculate average color once per tile

This commit is contained in:
PurpleMyst
2022-07-14 19:34:18 +02:00
parent 6a058934ed
commit d7c5bf5121
3 changed files with 49 additions and 19 deletions

18
convert_heic.py Normal file
View File

@@ -0,0 +1,18 @@
from pathlib import Path
from subprocess import run
from send2trash import send2trash
from tqdm import tqdm
def main() -> None:
files = list(Path("tiles").glob("*.heic"))
with tqdm(files) as pbar:
for file in pbar:
pbar.set_description(f"Converting {file}")
run(("magick", file, file.with_suffix(".jpg")))
send2trash(file)
if __name__ == "__main__":
main()