0

Does anybody know how to, and is it even possible to read ICC colour profile data from image jpg/jpeg file via JavaScript in the browser?

1 Answers1

1

I would suggest exifr. It's isomorphic so it works in both browser and nodejs and besides EXIF parses also ICC, IPTC, XMP and JFIF.

exifr.parse(input, {tiff: false, icc: true}).then(output => {
  console.log('ICC', output)
})

input can be anything.

options.tiff is enabled by default so we can disable it since we're only looking for ICC.

whereas options.icc is not by default so set it to true

Also there is a demo page with playground where you can try it out :)

Mike Kovařík
  • 244
  • 2
  • 8