<script>
var reader = new HEIFReader('test/1.heic');
var decoder = new HevcDecoder();
var imgData = new ImageProvider(reader, decoder);
reader.requestFileInfo(function(payload) {
if(payload.success !== true) {
console.error("Could not read file:", url);
} else {
var fileInfo = payload;
console.log("FileInfo contents:", fileInfo);
if (fileInfo.rootLevelMetaBoxProperties) {
var masterContextId = fileInfo.rootLevelMetaBoxProperties.contextId;
var masterItemIds = [];
var imageFeaturesMap = fileInfo.rootLevelMetaBoxProperties.imageFeaturesMap;
for (i in imageFeaturesMap) {
if (imageFeaturesMap.hasOwnProperty(i) && imageFeaturesMap[i].isMasterImage === true) {
masterItemIds.push(parseInt(i));
}
}
console.log("Master images in the file:", masterItemIds);
imgData.requestImageData(masterContextId, masterItemIds, alert('Ok'));
}
}
});
</script>
https://heictojpg.com
https://freetoolonline.com/heic-to-jpg.html
На счет imagemagick не знаю, сейчас гляну.
Кстати, вот нашел на гитe в issues. Там эти траблы тоже нашли, что не может heic от iPhone распознать