openbenches / openbenches.org

OpenBenches.org - an open data repository for memorial benches
https://openbenches.org/
MIT License
170 stars 26 forks source link

Support HEIC files #190

Open edent opened 5 years ago

edent commented 5 years ago

As an Apple user, I want to be able to upload in this new format.

https://twitter.com/rafal_design/status/1105171620568723457?s=20

edent commented 5 years ago

From the ImageMagick changelogs, you need 7.0.8-25 for ImageMagick 7 or 6.9.10-25 for Imagemagick 6.

https://stackoverflow.com/questions/55131609/read-exif-data-from-heic-photo-using-php?noredirect=1#comment97005467_55131609

natesilva commented 5 years ago

When uploading a HEIC photo from an iPhone, it’s automatically converted to JPEG—but the GPS data is stripped, so it won’t work with OpenBenches.

To support HEIC we’ll need to know how to prevent Safari from converting the file to JPEG.

And for any other iPhone users wondering how to upload such a thing:

By doing this, it converted the photo to JPEG while preserving its GPS data.

edent commented 3 years ago

Getting back to this.

edent commented 3 years ago

Reading EXIF server side

$imagick = new Imagick();
$imagick->readImage('test1.heic');
$exifArray = $imagick->getImageProperties("exif:*");
var_dump($exifArray);
edent commented 3 years ago

There are libraries for rendering HEIC in the canvas

1.3MB though!

Demo at https://strukturag.github.io/libheif/

edent commented 3 years ago

Reading Geolocation EXIF from HEIC

https://github.com/exif-heic-js/exif-heic-js