diff --git a/exif.js b/exif.js index 0fe5b3e..7d3cfe8 100644 --- a/exif.js +++ b/exif.js @@ -38,7 +38,17 @@ function getFromImage(filename) { let faces = []; if (Object.prototype.hasOwnProperty.call(tags, "PersonInImage")) faces = tags.PersonInImage; - + // support for Picasa embedded face regions + else if (Object.prototype.hasOwnProperty.call(tags, "RegionInfo")) { + out = []; + for (i=0; i < tags.RegionInfo.RegionList.length; i++) { + if (tags.RegionInfo.RegionList[i].Name) + out[i] = tags.RegionInfo.RegionList[i].Name; + } + //console.log("Found Region Names: ", out); + faces = out; + } + resolve({ modif: modif, faces: faces, @@ -64,4 +74,4 @@ function end() { module.exports = { getFromImage: getFromImage, end: end -}; \ No newline at end of file +};