4

So I know this question has been asked several times, but I can NOT find a clear, definitive answer.

I am trying to use pure HTML5 & AJAX/C# (nothing else if possible) to simply capture a photo, from a mobile page (not an app), via IOS/Android. So far with the code I have, everything works fine for Android, but the issue is IOS' new HEIC image format.

My goal is to convert the HEIC image, captured by the form input, and convert it to JPG before sending it to the server.

Could someone please explain how to do this, (in a little detail), and also include any dependencies/libraries that are needed to do it.

PS: I am very aware of Nokia's GitHub project (which doesn't work), and also the overly expensive API that does it for you.

1 Answer 1

1

Came across your question looking for answers but sadly didn't find any :( However, I've been successful to do the conversion using libheif.

I've created this repository which uses libheif but with much simpler API. This can only be used in the browser, and the resulting image won't retain any metadata. However, it will work as you would expect.

Here's a demo: https://alexcorvi.github.io/heic2any/#try

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.