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?
Asked
Active
Viewed 1,337 times
0
-
JavaScript in the browser or in an environment like NodeJS? Very related: [How to get image color mode (CMYK, RGB …) in Javascript](https://stackoverflow.com/q/37992117/215552) – Heretic Monkey Feb 10 '20 at 14:54
-
In the browser, I edited the question :-) – Artur Juźwik Feb 10 '20 at 15:07
-
There you go https://github.com/exif-js/exif-js – Vinay Feb 10 '20 at 17:19
-
that`s exif standard not ICC – Artur Juźwik Feb 11 '20 at 07:10
-
exif-js is buggy and no longer maintained. And it does not support ICC. – Mike Kovařík Mar 12 '20 at 12:47
1 Answers
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