Foliotek / Croppie

A Javascript Image Cropper
http://foliotek.github.io/Croppie
MIT License
2.58k stars 884 forks source link

Can croppie be updated to support heic files? #782

Open xxxmicrobexxx opened 1 year ago

xxxmicrobexxx commented 1 year ago

Croppie is great, but it doesn't support heic images. Any chance of adding that functionality?

bret-miller commented 1 year ago

From what I understand about Croppie, which I admit is limited my own use and knowledge of JavaScript, it seems like a trivial change to line 1398:

RESULT_FORMATS = ['jpeg', 'webp', 'png', 'heic'];

I personally always pull png and use PHP to convert to the desired destination format. Even PHP doesn't yet support heic, though you can call imagemagick to convert. Since Croppie works internally with "canvas" and not a particular image format, any browser-supported output format should work simply by adding it to the allowed list of result formats.

I could do a pull request for the change but I don't have a good way to test it. And I don't have any permission to merge the pull request back in so I'm not sure it would ever be included. The last included change was in April 2019. So while Croppie still works great, it seems to be a relatively dead project.

Forage commented 1 year ago

Duplicate of #763