Skip to content

Instantly share code, notes, and snippets.

@bno1
bno1 / gimp_heic_convert.py
Last active March 5, 2024 07:34
A Gimp script for a friend to help them convert their photo collection from HEIC to JPEG. To run open up Gimp, go to Filters -> Python-Fu -> Console and paste the script below. Make sure to edit the last line with your photo directory. For the JPEG output it uses 95% quality and the rest of the settings are maxed out (floating-point dct and 4:4:…
import gimpfu
import os
import re
import traceback
heic_ext_re = re.compile(r'\.heic$', re.IGNORECASE)
def convert(filename):
new_name = heic_ext_re.sub('.jpg', filename)