george.black

gb

Issues With Apple Photos and Fuji X100VI HEIF Images

September 20, 2024

After placing an order in February, and waiting many agonizing months, I got my hands on the Fujifilm X100VI – perhaps the most coveted modern camera (and my first non-Nikon purchase).

A Fuji X100VI camera close-up
This camera is essentially my child

One of the enticements of this camera (albeit minor), is its ability to shoot HEIF images out-of-camera, as opposed to standard JPEGs. HEIF is a modern image format (created in 2015), that provides better image compression. JPEG was created before I was born.

I’m a modern man, and a modern man demands modern image formats.

(Side note: I understand that by shooting RAW, you can export images to any format. But I don’t have time for RAW in my life. As much as I love Lightroom, it’s where my photos go to die.)

As an Apple user – I’m aware that the iPhone shoots HEIF images as well. Because of this, I assumed that support within the Apple ecosystem for HEIF would be first-class. This is where I ran into trouble.

The Problem with Apple Photos and HEIF

To import photos from the Fuji, I attach an SD card to my iPhone and import using Apple Photos. So far, so good.

After importing, the issues arise. First, photos appear to be incorrectly cropped and rotated when browsing them.

An image incorrectly displayed in Apple Photos

This photo itself has the correct orientation. It’s the app that is displaying it incorrectly.

This issue appears inconsistently – and more frequently on vertical photos.

For reference, this is what it looks like displayed correctly:

An image correctly displayed in Apple Photos

Sometimes the issue subsides. Other times, specific images appear to be “stuck”, unable to correct their orientation.

Alongside this, images take a long time to display in full resolution. When zoomed in, the preview thumbnail takes a long time to be replaced (if it ever is). (And this is an M2 MacBook Air, which is no slouch):

A blurry, zoomed-in image in Apple Photos

Reference:

A crystal-clear, zoomed-in image in Apple Photos

Editing one of the “cursed” images is nearly impossible. The controls never become interactive, as the image gets stuck with a loading spinner in the lower-right corner:

Unsuccessfully editing an image in Apple Photos

Finally, when clicking and dragging an image out of photos, the original is exported by default (as opposed to exporting a more-compatible JPEG). Weird!

These issues don’t appear isolated to Photos for Mac. The display issues translate to iOS as well:

Apple Photos on iOS displaying an image incorrectly

(Tested on macOS 14.6.1, macOS 15.0, and iOS 17.6.1.)

I assumed these issues were temporary; that Apple would fix them. After living with them for months, I’m convinced that something is wrong with the photos themselves.

Both the Fuji and my iPhone produce HEIF images. What makes the Fuji photos different such that these bugs are produced?

Dissecting the Image File

Lets take a look at this image of my wiener dog, taken on the Fuji, and copied from the SD card:

A screenshot of a macOS desktop with an image file

Obligatory pic of the weenie, for reference:

The cutest dog you've ever seen

Wait, what’s that file extension? .HIF? That’s a bit confusing. Images from my iPhone use the .HEIC file extension – and they are both supposedly HEIF images.

Regardless, let’s open the image in an app called MediaInfo to understand more about the contents of the file.

A screenshot of the MediaInfo program

Hmm, an heix file? With five embedded HEVC images? What do these have to do with HEIF? What does any of this mean? If you’re lost, so am I.

Out of curiosity, this is what an iPhone photo looks like; a heic file with many (45!) embedded smaller HEVC images. Why?

A screenshot of the MediaInfo program

I have no idea what this means, yet. Let’s learn more about what HEIF is.

Understanding HEIF

HEIF and Codecs

A JPEG image is just that, an image compressed using the JPEG codec (or algorithm), stored in the JPEG file format.

HEIF images can be much more complex. First, HEIF itself is a file format, or “container” for one or more images. HEIF “containers” can store different types of images, encoded with different algorithms, or “codecs”.

The “codecs” supported by HEIF are:

AV1 and HEVC are modern codecs that provide better image compression that JPEG. This means not all HEIFs are made equal. And yes, it also means that JPEGs can be embedded in a HEIF container! Wild!

Returning to the metadata provided by MediaInfo, we see both Fuji and iPhone HEIFs embed HEVC-encoded images. This is good! We can likely eliminate “lack of codec support” as a possible cause of issues in Apple Photos.

(Side note: I’m very thankful the Fuji isn’t simply embedding JPEGs in a HEIF container, that would be something.)

HEIF and File Extensions

But what about the different file extensions on the images produced by each camera?

The iPhone produces .HEIC images, while the Fuji produces .HIF.

Another complexity in HEIF is its support for multiple file extensions, such as .HIF/.HEIF, .HEIC. Each extension implies something different:

By this definition, all .HEIC files could also be .HEIF, but not all .HEIF files could be .HEIC.

Interesting – the Fuji uses HEVC for compression like the iPhone, but chooses to use a less-specific file extension. This is suspicious. I’m no expert, but I imagine a .HEIC image is easier for software to deal with, given that it clarifies what container and codec the image is using. A .HEIF may be more mysterious – leaving more to the software to interpret on its own. Having written a few lines of code myself, I can imagine the ambiguity is not helpful.

HEIF and Multiple Images

Why does one file have multiple embedded images? Doesn’t the file only represent a single photo?

Yes, it represents a single photo. That photo is carved into several smaller parts, and stored as multiple images within a single HEIF container. There are people much smarter than myself that understand why.

This appears to be standard across Fuji and iPhone images, so it is not a cause for concern.

Read the Manual (or, RTFM)

At this point, I’ve learned a lot about image formats, but have yet to discover why these specific images give Apple Photos such a hard time.

As a last resort, I decided to review the relevant portion of the user manual for my Fuji camera.

The Fuji X100VI user manual
HEIF pictures are stored on the memory card as files with the extension “.HIF”. Before the pictures can be viewed on a computer, the extension must be changed to “.HEIC”. This occurs automatically when HEIF pictures are uploaded from the camera to a computer via USB.

Huh – what?

What?

I’ve been importing photos from an SD card, blissfully unaware of the fact that I need to change the fucking file extension before I can use the photos.

First, I confirmed that connecting the camera via USB does automatically change the file extension on import.

Second, I renamed my beloved weenie dog photo from DSCF0538.HIF to DSCF0538.HEIC, and provided it as an offering to Apple Photos once again.

Changing the file extension of a file in Finder

And... it’s flawless. Everything just works!

Regardless of whether there is a bug in Apple Photos, it appears to be a necessity to rename prior to using the images from the Fuji – which is something Fujifilm needs ti address.

I’m not sure why the photos aren’t written with to the SD card with a .HEIC extension by default, but I would love to know. Software oddities like this often have interesting (or horrifying) stories behind them.

Exporting and Re-Importing to Apple Photos

If you, like me, have a series of Fuji .HIF images if your Apple Photos library that need to be renamed, you can take the following steps.

First, you’ll want to select and export the “Unmodified Originals” – which should result in .HIF files, wherever you choose to save them.

Exporting images in Apple Photos

In Finder, you can batch rename a set of images by selecting them, right-clicking, and selecting “Rename”. The ensuing menu will allow you to “Replace Text”, where you can replace HIF with HEIC.

Now, prior to re-importing these images to Apple Photos, they must be permanently deleted from your Apple Photos Library. This is important!

If you delete a photo in Apple Photos, it is sent to your “Recently Deleted” album, which implies that the photo still exists in the database/library. When re-importing the photo, Apple Photos will recognize it as a duplicate, and use the original image file instead of the renamed one.

You can replicate this issue with the following steps:

The solution is to empty your “Recently Deleted” photo album before re-importing the images.

I hope this post helps at least one other person that ran into the same frustrations. To that person: I hope this fixes your Fuji/HEIF/Apple Photos workflow like mine, at least until we all standardize on JPEG XL!