Skip to content

Instantly share code, notes, and snippets.

@tuaplicacionpropia
Created June 24, 2018 16:17
Show Gist options
  • Save tuaplicacionpropia/becfade4c8450445c0293416353d8cea to your computer and use it in GitHub Desktop.
Save tuaplicacionpropia/becfade4c8450445c0293416353d8cea to your computer and use it in GitHub Desktop.
Convert HEIC to JPG (batch)
#!/usr/bin/env python
import os
from os import listdir
from os.path import isfile, join
mypath = os.path.dirname(os.path.realpath(__file__))
onlyfiles = [f for f in os.listdir(mypath) if os.path.isfile(join(mypath, f)) and f.endswith('.heic')]
print onlyfiles
#tifig -v --quality=100 -p IMG_0076.heic IMG_0076_2.jpg
for f in onlyfiles:
cmd = "tifig -v --quality=100 -p " + f + " " + f + ".jpg"
print cmd
os.system(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment