The continuing confusion around16-bits (or even 12-bits) HEIC images

The previous question was closed so I'll open up a new one.

I've already spent a lot of time and effort trying to make this work because I was hoping to use a higher bit-depth .heic format to store the slides and photographs I scanned in the past years.


Even lossless 16-bit .heic would likely be a lot smaller than 16 bit TIFF or PNG images - that is, if it would work.


As mentioned in all the previous discussions, the Preview app in Mac OS has a greyed-out "16 bits" depth option when exporting a 16-bit TIFF or PNG image to .heic. As mentioned in the previous thread, it looks as if Apple has only partially implemented HEIC support.


But it's more complex than that. When I started looking into this in November '20 I found the libheif project on Github, which was supposedly able to convert 16-bit TIFF or PNG images into .heic format up to 12 bits.

Why only to 12 instead of 16 has never become clear to me, but I reckoned that a12 bits original can already stand some editing before visibly posterizing, so that was already quite useful.


Unfortunately, libheif produced odd results for some combinations of greyscale/RGB and bit depth, like stretching the image horizontally or turning the image completely green. I opened an issue to report these issues and I think they eventually fixed those issues.

At the time I was still on Catalina, and even though Preview couldn't produce these files itself, I could display 12-bit heic images in it just fine (confirmed in Inspector > More info tab > Depth, and also in the Photos app.


But then Big Sur came, and killed that option. In Big Sur, 12-bit .heic images showed up completely white. I tried everything I could think of: updating libheif; trying instead with Imagemagick and Gimp and whatever I could find. But nothing worked, and I eventually just let it rest for a while. At least I hadn't yet started to use that odd 12-bit .heic format yet.


And now, on Monterey, I got curious again and tried if Apple had maybe reverted breaking the display of 12-bit .heic files. Or (not holding my breath) - even gotten around to making the 16-bits version work.

But, no. Though there is one very small improvement: I can now create 10-bit .heic files using either ImageMagic or libheif, and they show up perfectly OK in Preview (including in the Inspector).

Actually, I can even create 12-bit files, but that turns the images uniform dark blue. Interestingly, Preview Inspector does report it as having a depth of 12 bits.

But 10 bits - I don't know. 12 bits was still a significant improvement over 8, but 10 is hardly worth the effort.


But it really puzzles me to no end that in all those two years I haven't been able to find a statement from Apple why they left .heic so crippled in the first place. It doesn't make sense. Maybe it's infringing on some remote legal issue. But they could have at least mentioned that.


And why would they break supporting the half-baked 12-bit option in Big Sur?


So you see, many questions and very little answers yet. But I'll keep an eye open if anything might improve, for it's just too useful to let go.



Posted on Sep 15, 2022 4:53 AM

Reply
6 replies

Sep 15, 2022 11:44 AM in response to - Luthien -

- Luthien - wrote:

I considered using PNG or TIFF but find the size requirements just too cumbersome.

Maybe you are using the wrong TIFF. TIFF really is "the standard" for imagery. As long as you don't get too fancy with obscure options, you can get decent compression. Every decent imagery tool supports TIFF.


It’s not so much that the cost of a drive holds me back, but with the number of pictures at hand it would become very tedious to share anything (they’re mostly old family pictures).

Maybe you're working too hard. I just tried to import a 16-bit TIFF into Photos and it has no problem with it. I can export the 16-bit original, or a small JPEG version.

I tried comparing heic files with the original TIFF version using different compression settings and I’m impressed how good they look, but maybe I’m easy to please ☺️.

That is the point, isn't it? But HEIC isn't good as a "shareable" format.

Thanks for the tip re. JPEG-2000! I’ve never seriously looked at that format, but I’ll do so now 👍🏻

It is more of a professional format. It supports 16-bit and lossless. But it is more difficult to find tools that support it. Apple has good support, but sometimes you have to hold down the option key to see JPEG 2000 options.

Sep 15, 2022 7:43 AM in response to - Luthien -

- Luthien - wrote:

Even lossless 16-bit .heic would likely be a lot smaller than 16 bit TIFF or PNG images - that is, if it would work.

Are you doing this because of file size? It would be a far better idea to just get more storage. There is no such thing as lossless HEIC. There are several options to compress TIFF files. You can also use JPEG2000, which has a real lossless setting.

Sep 15, 2022 11:11 AM in response to etresoft

Mostly for storage size, indeed.

I considered using PNG or TIFF but find the size requirements just too cumbersome. It’s not so much that the cost of a drive holds me back, but with the number of pictures at hand it would become very tedious to share anything (they’re mostly old family pictures).


Re. “There’s no lossless heic” - that makes sense given the achieved compression, but it’s still how the option is referred to. And besides, I think it’s more than good enough for the purpose. I tried comparing heic files with the original TIFF version using different compression settings and I’m impressed how good they look, but maybe I’m easy to please ☺️.


Thanks for the tip re. JPEG-2000! I’ve never seriously looked at that format, but I’ll do so now 👍🏻


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

The continuing confusion around16-bits (or even 12-bits) HEIC images

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.