Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Way to upload Heic files and automatically transform it into jpg #3645

Open
kainpro opened this issue May 15, 2020 · 4 comments
Open

Way to upload Heic files and automatically transform it into jpg #3645

kainpro opened this issue May 15, 2020 · 4 comments
Labels

Comments

@kainpro
Copy link

kainpro commented May 15, 2020

Hello good morning with the new format that is available in some devices I would like to know if, as well as when capturing a photo, the same plugin transforms the image to jpg, if there is an identical way to upload files saved in heic format, transform it to jpg?

Greetings,

@blueimp
Copy link
Owner

blueimp commented May 15, 2020

Hello @kainpro,
thanks for your suggestion, I've marked this as a feature request.

I found the following library that supports converting HEIC/HEIF images to JPEG/PNG/GIF on the client-side:
https://github.com/alexcorvi/heic2any

It's unlikely that I would include this though, as the distribution file for heic2any is more than a Megabyte in size.

I think until browsers support this format natively, you're better off implementing this on the server-side, e.g. using libheif:
https://github.com/strukturag/libheif

@kainpro
Copy link
Author

kainpro commented May 18, 2020

Thank you very much for the information and response!

@jakubzavrel
Copy link

Hi @blueimp, I am using your amazing file upload, but main focus is upload from phones. iPhone and Android phones are using jpg/png less and less, but heic/heif is in systems of both platforms more and more. Could you please reconsider implementing any kind of heic/heif transform to jpg as was asked orginaly above? Browsers cant handle heic/heif but phones takes photos in this format 8)

Heic2any looks promising, but I dont know how to implement it. My idea was to implement it into your _onAdd function in jquery.fileupload.js if file is heic/heif via this suggestion: https://stackoverflow.com/questions/57127365/make-html5-filereader-working-with-heic-files unfortunately I dont know how to rework you functions to async functions so I am stuck 8(

May I ask you about any suggestion or implementing any solution from your side?

thx for answer

@blueimp
Copy link
Owner

blueimp commented Sep 25, 2021

Hi @jakubzavrel, any file processing should be done via the processing queue.
Unfortunately there is no documentation, but you might get an idea by reading the source for these files:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants