How Apple is squeezing more photos into your iPhone

Back in 1992, Bill Clinton was elected US president, Microsoft released Windows 3.1 and digital photo experts created the JPEG image format. The first two are mostly matters for historians now, but a quarter century later, JPEG remains a part of our daily lives.

That's a remarkable achievement for the fast-moving computing industry. Apple, though, thinks it's time to start moving on.

To that end, it announced this month at its WWDC programmer conference that it's endowing its iPhones, iPads and Macs with support for a new photo-storing technology called HEIF, short for High Efficiency Image Format. HEIF needs only half the storage space as a JPEG photo of the same quality. So surely adopting HEIF is a no-brainer?


Compatibility problems and other factors complicate HEIF's prospects. But Apple has massive clout in the computing industry. If it succeeds in pushing HEIF into the mainstream, we stand to benefit -- not just from saving storage space, but also from cooler animated photos, more powerful image-editing possibilities and even fulfilled promises of augmented reality.

To help you understand the issues, here's a look at HEIF.

Q: Why do I even need to worry about HEIF?
There's a good chance HEIF will barge into your life. Not only does it let you squeeze more photos onto your phone, HEIF also modernizes digital photography in important ways. Its future looks a lot brighter with Apple's backing. It's the world's most profitable tech company, selling one of the world's highest-profile phones and a lot of computers as well. Apple's endorsement carries a lot of weight with app programmers, chip manufacturers and the millions of people who use its products. Best to get a handle on HEIF now.


Google Trends shows how interest in HEIF, shown in blue, surged when Apple announced its support at WWDC. The red line shows the king of image formats, JPEG, and the yellow line is Google's competing WebP.

Q: Step back a sec. What is a photo file format again?
It's a standard way for computers to store and view pictures. With one, it doesn't matter if you took a photo with an Android phone and then share it with a college roommate with a Windows PC. JPEG, the king of photo formats, has been around for decades, and every computing device out there understands JPEG files. But HEIF is new, so most devices today have no idea how to handle them. For those devices, encountering an HEIF file is like when you visit a country where you don't speak the language.

Q: OK, but why do I care?
The biggest benefit is data compression. The original, high-quality version of an image often can be shrunk so you can fit more on your phone and worry less about blowing through your monthly network data cap when you share them.

Photos using HEIF take up half the space as a JPEG, or alternatively offer crisper, more detailed and colorful images at the same size. Nokia has some good HEIF examples.


These cropped-in views of a larger image show how HEIF, left, offers richer colors and fewer speckly artifacts near high-contrast borders compared to a JPEG of about the same size.

"From a technological point of view, there is no doubt it is better than JPEG," said Dror Gill, chief technology of image and video optimization company Beamr. "You get the same quality with fewer bits."

Q: How does HEIF compression work?
HEIF uses video compression technology called HEVC (High Efficiency Video Coding) that was designed by some of the best experts in the business -- the Motion Picture Experts Group. If you watched streaming video on your TV, phone or PC in the last day, chances are good it used their video compression technology. HEIF is the technique to compress individual frames that comprise an HEVC video.

HEIF uses some similar methods as JPEG, but goes a step further. JPEG breaks an image up into blocks, each of which is compressed with a clever combination of trigonometry and matrix mathematics whose details needn't worry you. One way HEIF improves on JPEG is by comparing those blocks. If one block is similar to another, HEIF records just the difference, which requires less storage space. In effect, for example, HEIF could tell a computer, "just put some blue sky here like we already did for the upper-left patch of the photo."

The promised halving of storage space isn't marketing hyperbole. "In our tests, we've seen even better levels, depending on the subject of the image," said Kelly Thompson, general manager of product, engineering and design at photo sharing and licensing site 500px, in a blog post.

Q: How does HEIF help modernize photography?
HEIF offers a lot more than just smaller photo file sizes, and indeed those other features are a big part of why Apple picked it. HEIF is actually a container that can hold a lot more than just a single image. It's a good way to store an animated image like an Apple live photo, for example, or one of those eerily compelling half-moving, half-still images called a cinemagraph. It also can hold a collection of photos taken in a burst, though Apple isn't using it for that purpose, at least now. It can also hold audio, video and text information, too -- imagine a short video clip with a caption that you might post on Snapchat.

"The line between photos and videos is blurred, and a lot of what we capture is a combination of both of these assets," said Sebastien Marineau-Mes, Apple's vice president of software, plugging HEIF at a WWDC talk.

When Apple uses HEIF for its live photos, that'll make it easier for other phone makers or app developers to view them. And if other phone makers want use the same feature, iPhone users should be able to see them more easily if they're recorded as HEIF images.

HEIF is ideal for cinemagraphs that combine moving and still imagery. It can bundle multiple frames of an animation and use video compression to shrink the whole package.

HEIF also can bundle multiple photos of the same scene, for example shots taken at different brightness levels that you might later want to combine into a single image through a technology called high-dynamic range (HDR) photography. Apple doesn't take advantage of this particular ability -- iPhones generate HDR images before they're saved into a file -- but HEIF opens the door for several computational photography technologies like HDR. Another use of stacks of photos is to package shots with different focus points that can later be combined for different photographic effects.

Q: What about augmented reality?
Here's another thing HEIF can do: store extra data called a depth map that records how far away each part of a scene is from the camera that took the photo. That's just what an iPhone 7 Plus can do with its dual-camera design, so HEIF offers a straightforward way for app developers to use that distance information once iOS 11 starts shipping. Apple uses the data to blur backgrounds in its portrait mode, but now others can use it for other effects -- generating a selfie of you on the moon or some other exotic location, for example.

"In iOS 11, we're storing the depth map as part of what we capture. We're giving you and your app access to the photo and the depth map, so you can load it up use this to do your own creative effects," Marineau-Mes told app developers.


HEIF can record a depth map that shows how far away each element of a scene is located. That'll make it easier for app developers to create photo effects.

That depth map is also really useful for the new field of augmented reality, which overlays digital imagery over a real-world scene. To do that, you need to know how far away the elements of a scene are.

Q: Sounds like the cat's pajamas. What are the downsides?
The biggest one is that most devices and programs don't know how to read HEIF files. Adobe Systems' Photoshop, for example, has no support. Nor do any web browsers. And it's tough to get new formats to catch on. Microsoft improved on JPEG with a format called JPEG XR, but it never got traction. Google's WebP format is now common on the web, but it's not used anywhere else. Even Google's Android phones can't take WebP photos.

Another problem: HEIF is based on the HEVC video format, and HEVC is clouded by expensive patent licensing concerns. That could keep important potential allies like Google away.

Hardware support is another concern. Devices can create and read HEIF files with just software, but hardware acceleration makes it faster and uses less battery power. In Apple's case, iPhones with an A9 chip or later, which includes the iPhone 6S and 6S Plus and succeeding models, can read HEIF images with hardware acceleration, according to an Apple WWDC talk on HEIF. To get this hardware acceleration, iPhones need the A10 Fusion chip that arrived with the iPhone 7 and 7 Plus in 2016. Hardware support should spread as HEVC video catches on, though; Intel's PC processors started supporting HEVC in 2016.

Q: If most devices can't read HEIF files, isn't Apple's adoption going to cause problems when it's time to post to Facebook or email a photo to my mom?
Nope. In some circumstances, like two iPhone users communicating through a chat app, software can determine whether HEIF is appropriate for sharing. But under all other circumstances Apple's software will convert a HEIF photo to a JPEG.

Q: Will Apple go through my photo archive and replace all my JPEG photos with HEIF photos?
Also nope. Converting photos from one lossy compression format like JPEG to another degrades the image. Apple will only use HEIF for new photos. That means you'll only get space-saving benefits for new photos you take.

Q: Will I start seeing files with names like "myphoto.heif" now?
Curve ball! At least for now, you'll see myphoto.heic. Yes, that's HEIC, not HEIF. If you're curious why, it's because HEIF can accommodate imagery created with a variety of technologies -- including JPEG and HEVC today and whatever shiny new compression technology might arrive in 2025. The .heic filename extension, which is the only one Apple will produce for photos, indicates it went through the HEVC encoder.


Because most devices and apps can't handle HEIF images, Apple turns them into JPEGs when you do something like share to Facebook.

Q: Will HEIF kill off JPEG?
No way. Even if HEIF turns out to be a smash hit, billions of JPEGs will persist on the internet, phones, PCs, digital cameras and countless digital nooks and crannies. If any formats achieve immortality, it'll be text files and JPEG.

Q: I know how to say "JPEG." How do I pronounce HEIF?
It hasn't made it to the dictionary yet. Everybody at Apple pronounces it "heef," but my Twitter followers disagree. Heef, hife, hey-f, heff -- we could be looking at another internet culture war like the dispute over hard G vs. soft G when saying "GIF." You've been warned.

First published June 16, 6:00 a.m. PT.
Update, 9:46 a.m.: Adds comment from 500px and details of HEIF hardware support in iPhones.

It's Complicated: This is dating in the age of apps. Having fun yet? These stories get to the heart of the matter.

Does the Mac still matter? Apple execs tell why the MacBook Pro was over four years in the making, and why we should care.

All the photos are from the web and the copyright retains with the original author. If there is any problem, please contact us.
You Might Also Like
Apple just made iMovie and a bunch of other apps free for everyoneApple just made iMovie and a bunch of other apps free for everyone​Apple has just cut the cost of a number of its Mac and iOS apps to the princely sum of zero.
Apple files patent application for optimization of focus stacksApple files patent application for optimization of focus stacksTechnology described in an Apple patent application could help speed up the focus stacking process and generate more precise depth maps for portrait modes and similar features.