Last active
October 5, 2022 19:21
-
-
Save TonyPepeBear/c9205def0a6c480e6f6fb8db6b4ccb8e to your computer and use it in GitHub Desktop.
jpg -> heic. Require ImageMagick in PATH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
heics = list(filter(lambda f : f.endswith(".heic") or f.endswith(".HEIC"), os.listdir("."))) | |
l = len(heics) | |
for i in range(l): | |
heic = heics[i] | |
print(heic + " (" + str(i+1) + "/" + str(l) + ")") | |
os.system("magick convert " + heic + " " + "".join(heic.split(".")[0:-1]) + ".jpg") | |
os.remove(heic) | |
input("Finish...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment