Jump to content

Recommended Posts

I wrote an image viewer/processor years ago, and use it for all of my image viewing.  Recently, iPhone friends have started sending me HEIC formatted pictures, which I cannot process with my software.  I've looked around for a free HEIC library (as I did with JPG and PNG in the past) but no joy.  Anyone know of a freeware HEIC library for Delphi Pascal?

Share this post


Link to post
10 hours ago, Lars Fosdal said:

https://www.copytrans.net/copytransheic/ installs a driver for Windows Imaging Component that allows conversion with WIC and is, as far as I can tell, free.

Brillant!

 

Do you know if it is compatible with the built-in https://blogs.windows.com/windowsexperience/2018/03/16/announcing-windows-10-insider-preview-build-17123-for-fast/#hL2gI3IBkfsGuK6d.97 ?
Do you know the WIC identifiers involved?

Share this post


Link to post
 
 
 
1
30 minutes ago, Arnaud Bouchez said:

Brillant!

 

Do you know if it is compatible with the built-in https://blogs.windows.com/windowsexperience/2018/03/16/announcing-windows-10-insider-preview-build-17123-for-fast/#hL2gI3IBkfsGuK6d.97 ?
Do you know the WIC identifiers involved?

Sorry, no idea. This was courtesy of Google search, but judging from the description, it should be a reasonably standard plugin for WIC, so the indentifiers should be discoverable through the WIC interfacees.

Share this post


Link to post
Guest
10 hours ago, Anders Melander said:

Here's the source for a C++ library: https://github.com/strukturag/libheif

Downloaded it, compiled it, translated few functions to make the example in readme works, searched for HEIF sample file found this https://newsgroup.xnview.com/viewtopic.php?t=32568 downloaded few of them.

heif_context_read_from_file was success

heif_context_get_primary_image_handle was success

heif_decode_image was error code 4 with msg="Unsupported feature: Unsupported codec"

 

Only then i realized that samples were HEIC with MPEG-H  while the library is for HEVC (h.265), and the whole HEIF (HEIC) is more complicated than it look ! 

and this might explain why https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Patent_holders

Share this post


Link to post
19 minutes ago, Kas Ob. said:

Only then i realized that samples were HEIC with MPEG-H  while the library is for HEVC (h.265), and the whole HEIF (HEIC) is more complicated than it look ! 

and this might explain why https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding#Patent_holders

Quote

As of April 2019, the MPEG LA HEVC patent list is 164 pages long

Holy sh*t!

 

I looked at the Gimp source and as far as I can tell this is the library they use to support HEIC. I wonder how they have gotten round the patents and after reading about them I'm surprised Gimp would even support the format. Maybe you don't need a license to decode.

 

I'm a bit confused about the difference between HEIC and HEVC. I get that I stands for Image and V for Video, but from Wikipedia I get the impression that Apple's HEIC files have been HEVC encoded:

Quote

In Apple's implementation, for single images they have chosen the latter .heic filename extension (.heics for image sequence files)[9] as the only one they will produce for photos, which indicates clearly that it went through HEVC encoding.

 

Anyhow, the patents alone are enough that I would stay away from the format.

Share this post


Link to post
1 hour ago, Anders Melander said:

Anyhow, the patents alone are enough that I would stay away from the format.

Quote

As with its predecessor AVC, software distributors that implement HEVC in products must pay a price per distributed copy. While this licensing model is unproblematic for paid software, it is an obstacle to most free and open-source software, which is meant to be freely distributable. In the opinion of MulticoreWare, the developer of x265, enabling royalty-free software encoders and decoders is in the interest of accelerating HEVC adoption.[178][182][183] HEVC Advance made an exception that specifically waives the royalties on software-only implementations (both decoders and encoders) when not bundled with hardware.[184] However, the exempted software is not free from the licensing obligations of other patent holders (e.g., Technicolor and members of the MPEG LA pool).

Freeware seems to have no problems... Anyway patented formats suck.

Share this post


Link to post

Thanks, everyone, for your help!  I just need this for my personal program, not a commercial program; and I would give it away if someone wanted a copy.  It is unfortunate, but not surprising, that Apple would choose a default format that is not open source...

Share this post


Link to post
Guest

@jon_bondy I really recommend you to do it yourself just for curiosity and educational porposes and in the future will be easier for you to do hard stuff when needed.

While this library is not going to work https://github.com/strukturag/libheif , this https://github.com/nokiatech/heif might (50% chance i guess) will work and do extract the needed, because you need a decoder and the code for such operation might be there( who knows !)

The binary size difference of both library is huge the former is around 500kb while the latter is 3.4mb and that reflect the inclusion of many formats and standards, what i recommend is to create a dll in visual studio add a small layer that simplify the input like the libheif , (alloc, read file ,decode , free) to do simple decode job, while leaving all the other noise untranslated, just make few Delphi API as simple as you can :alloc , feed the dll a file or buffer from memory , extract a jpg or bmp then free.

 

Wish you good luck.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×