iPhone: How to convert your HEIC photos

Discussion in 'all things UNIX' started by summerheat, Feb 10, 2018.

  1. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,330
    Since iOS 11 your iPhone saves photos in the High Efficiency Image Format (HEIF) with the HEIC extension.

    However, after accessing your iPhone - by following the steps outlined in @Mrkvonic 's article - and copying those photos to your hard disk, you'll probably find that you cannot open them - unless I missed an image viewer which is able to do it.

    Fortunately there is an open-source tool which converts HEIC images. Just download the newest .tar.gz file and extract tifig to a folder in your $PATH, e.g. /usr/bin.

    Now you can easily convert a HEIC image to a JPG image by executing:
    Code:
    tifig -v -p image.heic output.jpg
    But what can you do if you have hundreds of HEIC images which you want to convert? Converting them one by one is a bit arduous. That's why I created a small script which I called heicconvert and does the work for you:
    Code:
    #!/bin/bash
    for f in *; do
    tifig -v -p "$f" "${f%.*}.jpg"
    done
    Save that script in ~/bin and make it executable. cd to the folder where your HEIC images are saved and execute heicconvert. Ready!
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    9,235
    I have not noticed the heif issue. On the test iPhone (6s + iOS 11) I have, the photos are regular jpegs.
    Mrk
     
  3. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,330
    This article suggests that you probably chose "Most compatible" in the settings.
     
  4. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    9,235
    To be honest, I didn't play with any settings - except disable those ugly 2-sec videos that are also recorded when you take stills.
    Mrk
     
  5. summerheat

    summerheat Registered Member

    Joined:
    May 16, 2015
    Posts:
    1,330
    Neither did I (as far as I can remember). But perhaps the update to iOS 11 did it on some devices (I have an iPhone 7).
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.