banner
Previous Page
PCLinuxOS Magazine
PCLinuxOS
Article List
Disclaimer
Next Page

HEIC Images: A New Graphics Format Player In The Game


by Paul Arnote (parnote)


Right up front, let me just state that I don't own an “i” anything. No iPad. No iPhone. No iPod. Nope. Nothing preceded by an “i.” The closest I ever came was when I bought my wife an iPod Shuffle when they first came out, and that was years ago (they have been discontinued long ago).

And, until just a few weeks ago, I had never even heard of HEIC graphics files. Believe it or not, these two things are connected. You'll see the connection here in a few minutes.


What Are HEIC Images?

I definitely had to do some exploring here, having never heard of or encountering HEIC images.

Just like WEBP graphics use the compression technology of the VP8 video codec to create high quality still images that are absolute misers when it comes to file size, HEIC images use the H.265 video compression codec from the Motion Pictures Experts Group to create high quality still images with impressively small file sizes. You can see our coverage of WEBP graphics here.

The HEIC format was formally “finished” in 2015 by “the Group,” and Apple adopted it in 2017. Today, unless the “i” user has changed the defaults, all images taken by a current iPhone or iPad are saved in the HEIC format.

While it's easy to see or understand why Apple is/was attracted to the HEIC format due to its high image quality and small file sizes, it does create a problem when an “i” user attempts to share images with someone who isn't a member of the “i” club. Adoption and support for the HEIC format is NOT universal, at least not yet.

To somewhat complicate things more, HEIC isn't so much of a file format as it is a container format. If you're not sure what a container format is, they've been with us for a while. Think of interleaved audio and video files (the “rest of us” used to call them AVI files, back in the day). Within that container, both the audio and video portions of the file are capable of being compressed by different codecs, and then the data is stored in the AVI container in such a way that it can be easily and properly put back together by the player when it comes time to play the AVI file back.

From Wikipedia:

HEIF is a container format, it can contain still images and image sequences that are coded in different formats. The main filename extensions are .heif for still images and .heifs for sequences, which can both be used with any codec. Generic HEIF image files are typically stored with filename extensions .heif, but they may use a different extension to indicate the specific codec used.

HEIF means High Efficiency Image Format. So, the way that Apple is utilizing the HEIC format is for storing images. HEIC, in the way that Apple is using it, means High Efficiency Image Codec. HEVC, in the way that Apple is using it, means High Efficiency Video Codec. For the latter, the “rest of us” call it H.265 encoded video.

Granted, the HEVC format (H.265) is quite adept at storing high quality video in some of the smallest file sizes I've ever encountered. If you want or need to explore HEVC farther, we've covered them in the past. You can view Archie's solution to converting his video files to HEVC here, in the March 2021 issue of The PCLinuxOS Magazine. So, much in the way that WEBP files leverage the compression techniques of the VP8 video codec to produce smaller, high quality still images, HEIC leverages the compression techniques of the H.265 video codec to produce smaller, high quality still images.

In the way that Apple is using the image format, that image can contain the same image at different resolutions, images stored in different formats, or a sequence of images, all wrapped up in the container format. The end user can then extract which of those images or image sequences they want/need to use, provided that the tool the user is using is capable of extracting them. If that makes your head spin a bit, do not feel alone. I experienced the very same feeling. It's a lot to wrap your head around.

I should at least explain how/why I went down this “rabbit hole.” I originally saw an article on Lifehacker about how to view or convert HEIC files on Mac or Windows. To be perfectly honest, that was the very first time I had heard about HEIC files. So, that got me thinking, “What about Linux?” This article is a result of going down that rabbit hole.

The Lifehacker article explains how to make your iPhone or iPad share images with other platforms that are more easily viewed. Their article also instructed those “i” users on how to change the default from HEIC to JPG (although I wouldn't take that route, and forfeit the advantages that HEIC files provide … higher image quality at smaller file sizes).

That article also suggests using online graphic file converters to convert HEIC files to a format that is more easily viewed (and much more widely accepted). However, I wanted to avoid that situation altogether, fearful that this particular solution won't settle well with a lot of users who go out of their way to preserve their privacy. And, I can't say I blame them, with every entity on the web (it seems) wanting to extract its ounce of personal and private information. Being able to convert them on your own computer, without uploading anything online, is the best solution that helps preserve user privacy.

The file size savings for the HEIC format are HUGE. Compared to JPG files, HEIC images offer far better resolution, at file sizes that represent very significant savings in storage space. For the sample HEIC image used below, it comes in at 1.5 MB in file size. Converted to JPG, the same file takes up 2.3 MB of storage space. As a PNG file, the image comes in at 13.4 MB. And, as a WEBP file, the image comes in at a very comparable 1.3 MB.


How To View HEIC Images

Some operating systems now come with (or easily facilitate) the viewing of HEIC files. Windows 10 users can view them if they are running release 1803, provided the user has installed the HEIF Image Extension. Windows 11 users have the ability to read HEIC files built-in, from version 22H2 and later. MacOS from High Sierra and after has the ability to read HEIC files. iOS users can read and write HEIC files from iOS 11 and later. Android users from Android 10 and later can read HEIC files. As for Linux, it appears that it's more driven by what software you use, as opposed to a system-wide ability to view HEIC files.

As for software on PCLinuxOS that is capable of displaying HEIC files, those software programs include GIMP, Krita, ImageMagick, DarkTable, GPicView, Shutter and Ristretto. For what it's worth, GPicView did not properly display the HEIC file initially. But, upon a subsequent attempt (I was attempting to show how things look in a program that doesn't support viewing HEIC files), GPicView displayed them perfectly. I have *no* idea why it failed the first time. The real “heavyweights” here are GIMP and ImageMagick. With those two alone, there is no problem viewing, creating or converting HEIC files.

As for web browsers, ONLY Apple's Safari is capable of displaying HEIC images.

Meanwhile, I've found (mostly by trial and error) that mtPaint and XnViewMP are incapable of properly displaying HEIC images. I'm certain that there are other graphics viewers incapable of properly displaying HEIC images, but I'm not prepared to install every graphics viewer in the PCLinuxOS repository just to find out which ones display HEIC images and which ones don't.


Some HEIC Examples

What would an article about a “new” image format be without some examples? Even with a leisurely search, it's relatively easy to find some HEIC image samples.

Here is a HEIC image loaded into GIMP:


Sample HEIC Image loaded into GIMP


Here is the same HEIC image loaded into Krita:


Sample HEIC Image loaded into Krita


Here is Ristretto viewing the same HEIC image:


Sample HEIC Image loaded into Ristretto


Here is GPicView viewing the same HEIC image:


Sample HEIC Image loaded into GPicView


And, here is Shutter displaying the same HEIC file:


Sample HEIC Image loaded into Shutter


Meanwhile, below is what you see trying to open a HEIC file in mtPaint:


Sample HEIC loaded into mtPaint


The image below is similar to what you might see if an image viewer doesn't properly support the viewing of HEIC files (and this is what I saw the first time I loaded up a HEIC file in GPicView). For this, I used ImageMagick's display command (but, ImageMagick DOES support HEIC files, so don't misinterpret this to mean that ImageMagick doesn't support them). I have used my Image Converter script (March 2023 issue), which leverages ImageMagick for the “heavy lifting,” to convert HEIC files to JPG, PNG or WEBP files, and the script produces perfect results.

For what it's worth, just inserting “heic” into line #5 of the aforementioned script, right after “webp” and before “avif,” adds the conversion to/from HEIC image files to the script. Easy peasy!


Sample HEIC loaded into GPicView, distorted


The improper display of colors is one of the first things you might notice, and is what I saw the first time I tried to view a HEIC file in GPicView.


Summary

To be perfectly honest, I have zero ideas of why Apple chose to support HEIC over WEBP. At least WEBP graphics are displayable by most top-tier web browsers, and have found a greater and wider range of acceptance among users on different platforms. While “this” is only conjecture, I suspect it may have something to do with Google buying up On2 Technologies (the makers of the VP8 codec), and Apple not wanting to tie its fortunes to something owned and controlled by Google, despite WEBP being released for free usage. The “climate” between Apple and Google hasn't always been “clear skies” or “clear sailing.”

With millions of “i” devices in use, and with every “i” device saving images in the HEIC image format by default, it's only a matter of time before we see much wider support for HEIC images.

Still, the image quality from HEIC images is easily on par with that produced by WEBP graphics, and the file sizes are quite small.

While I don't have a lot of confidence in the MPEG folks (they are the ones who also came up with JPEG2000, JXL and multiple other formats that have failed to gain traction), HEIC images will eventually gain traction as more and more of them proliferate from users of “i” devices.



Previous Page              Top              Next Page