View .HEIC Photos on LINUX


Published: 2019-07-02
Updated: 2019-07-02
Web: https://fritzthecat-blog.blogspot.com/2019/07/view-heic-photos-on-linux.html


If you come across photos that were made using an iPhone you may have seen that there is a new image format on IOS. It is called "High Efficiency Image File Format", delivered with the extension ".HEIC" (High Efficience Image Container), although the format is called "HEIF".

If you want to view such photos on LINUX, you may encounter that it is not yet supported by the native Nautilus file manager (I used Ubuntu 18.04). Of course there is a workaround for this. I found fitzcarraldoblog and followed his advices. Here is a short summary of what I did to view HEIC images, and convert them to JPEG.

Convert to JPEG

Download and install the package libheif-examples by opening an input terminal window and typing

sudo apt install libheif-examples

You must enter the root password to install new software on LINUX. After this finished successfully, you should be able to convert a .HEIC file to a .JPEG file by typing

heif-convert XXX.HEIC XXX.JPEG
eog XXX.JPEG

The XXX.HEIC would have a XXX.JPEG sibling after, the original file remaining unchanged.
eog is the image viewer used by Nautilus.
Mind that LINUX files names are case-sensitive!

Here is a shell command to convert all .HEIC files in current directory to .JPEG files:

for image in *.HEIC; do heif-convert $image `basename \$image .HEIC`.JPEG; done

This is a loop over all .HEIC files with an according conversion-command. The basename command removes the .HEIC extension from the file name.

The libheif-examples package contains heif-convert, heif-enc and heif-info, so you could use

heif-info XXX.HEIC

to verify that a file actually is a HEIF.

View HEIC

You can use a version of GIMP greater equal 2.10.2 to view such files. So first uninstall your old GIMP (it may not get replaced!) and then install the newest one (it is free). Problem is that GIMP is an image editor, not an image viewer, so viewing series of photos may become tedious.

Also ImageMagick already supports HEIC.

Being very ambitious you can download Nokia source code and implement your own HEIF application. It also contains a Java source variant.





ɔ⃝ Fritz Ritzberger, 2019-07-02