Search code examples
nodesexif

Exif-Parser in Node, extract XPComment, XPKeyword tag values


While, using Exif-Parser in Node, fetching Tag values of XPComment, XPKeywords seem to be an Array(unsure what the type is). I want to log these tag values How to get it in a readable format.


Solution

  • I found that the XPComment and XPKeywords are parsed as Byte array, This can be converted to String value using String.fromCharCode.

    For example: String.fromCharCode.apply(null, [102, 111, 111]) equals 'foo'.

    Link: https://stackoverflow.com/a/37542820/2011046